HP Pascal/iX Reference Manual (31502-90022)
Table Of Contents
- Top of Document
- Preface
- Chapter 1 Introduction
- Chapter 2 Language Elements
- Chapter 3 Data Types
- Chapter 4 Expressions
- Chapter 5 The Declaration Section
- Chapter 6 Statements
- Chapter 7 Program Structure
- Chapter 8 Procedures and Functions
- Chapter 9 Standard Routines
- Chapter 10 Input and Output
- Chapter 11 System Programming Extensions
- Chapter 12 Compiler Options
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