Previous Topic Next topic Print topic


PLIFILL Subroutine

Purpose

Fills n bytes at an address with a specified byte value.

Syntax

CALL PLIFILL(x, y, z);

Parameters

x is an expression that must be declared POINTER or OFFSET. If OFFSET, you must use the AREA attribute to declare x.

y is a byte that must be declared CHARACTER(1) NONVARYING.

z is an expression that is converted to FIXED BINARY(31,0).

Description

PLIFILL moves z copies of the specified byte ( y) to a location ( x) without any conversions, padding, or truncation.

The PLIFILL, PLIMOVE and PLIOVER built-in subroutines are also useful in managing buffers.

Examples

foo: proc() options(main);

DCL PLIFILL builtin;
   
DCL mystring char(10) init('AAAAAAAAA');
   
CALL PLIFILL (addr(mystring), 'B', length(mystring));
   
PUT DATA(mystring);

Restrictions

None.

Previous Topic Next topic Print topic