Previous Topic Next topic Print topic


PLIOVER Subroutine

Purpose

Moves n bytes from one address to another, compensating for possible overlap of the source and target. Usage of PLIOVER is the same as PLIMOVE, with the exception that storage for x and y can overlap.

Syntax

CALL PLIOVER(x, y, z);

Parameters

x and y are expressions declared POINTER or OFFSET. If OFFSET, x or y must be declared with the AREA attribute.

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

Description

The PLIOVER built-in subroutine moves z storage units (bytes) from location y to location x, without any conversions, padding, or truncation. Unlike the PLIMOVE built-in, subroutine, storage at locations x and y can overlap. The PLIFILL, PLIMOVE and PLIOVER built-in subroutines are also useful in managing buffers.

Examples

foo: proc() options(main);

DCL PLIOVER builtin;

DCL mystring char(10) init('BBBBBAAAAA');

CALL PLIMOVE(addr(mystring), addr(mystring)+ 5, 5);
    
PUT DATA(mystring);

end;

Restrictions

None.

Previous Topic Next topic Print topic