HP Pascal/iX Reference Manual (31502-90022)

9- 14
Example
CONST
one = '1';
VAR
b_num: string[12];
BEGIN
.
b_num:= strrpt(one,strmax(b_num)); { b_num is '111111111111' }
b_num:= strrpt ('a',10); { b_num is 'aaaaaaaaaa' }
.
END.
strrtrim
Usage
strrtrim
(s)
Argument
s
A string expression.
Description
The function strrtrim
(s)
returns a string consisting of
s
trimmed of
trailing blanks. Leading blanks are stripped by the function strltrim.
Example
VAR
s: string[80];
BEGIN
.
s:= 'abc ';
.
s:= strrtrim(s); { s is now 'abc' }
. { strlen(s) = 3 }
END.
Transfer Procedures
The
transfer procedures
supported by HP Pascal are
pack
and
unpack
. A
description of these procedures follows.
pack
Usage
pack
(a, i, z)
Parameters
a
Any ARRAY [m..n] of t.
i
An expression that is type compatible with the index of the
non-packed array.
z
Any PACKED ARRAY [u..v] of t.
Description
The standard procedure pack transfers data from unpacked arrays to packed
arrays. For example, assuming that
a
is an ARRAY[m..n] OF t and
z
is a