HP Pascal/iX Reference Manual (31502-90022)

11- 34
Figure 11-7. Copying Order for move_r_to_l
Fast_Fill.
The predefined procedure fast_fill provides a generalized method of
initializing an array to a single 8 bit constant.
Usage
fast_fill
(ptr,fill_char,count)
;
Parameters
ptr
A pointer expression.
fill_char
A constant expression.
count
A positive integer expression that contains the
number of bytes to fill with
fill_char
.
Description
fast_fill provides a fast alternative to for loops or assignment
statements for initializing each element of a structure or an array to
the same 8 bit value.
fill_char and ptr should of compatible types. fill_char must also
satisfy the following requirement:
0 <= ord(fill_char) <=255
Example
$standard_level 'ext_modcal'$
program fill;
var p100 : packed array [1..100] of char;
var i1000 : packed array [1..1000] of integer;
type heap_p = array [0..9] of integer;
var p : ^heap_p;
begin
fast_fill(addr(p100),' ',sizeof(p100)); {fill a string array}