HP Pascal/iX Reference Manual (31502-90022)

1- 6
A variable of type string can be compared with a similar variable or a
string literal or can be assigned to a variable of type string. A string
literal can be assigned to a variable of type string.
The following standard procedures and functions manipulate strings:
*
Setstrlen
sets the current length of a string without changing its
contents.
*
Str
returns a specified portion of a string, such as a substring.
*
Strappend
appends one string to another.
*
Strdelete
deletes a specified number of characters from a string.
*
Strinsert
inserts one string into another.
*
Strlen
returns the current length of a string.
*
Strltrim
and
strrtrim
trim leading and trailing blanks,
respectively, from a string.
*
Strmax
returns the maximum length of a string.
*
Strmove
copies a substring from a source string to a destination
string.
*
Strpos
returns the position of the first occurrence of a specified
string within another string.
*
Strread
reads one or more values from a string.
*
Strrpt
returns a string composed of a designated string repeated a
specified number of times.
*
Strwrite
writes one or more values to a string.
WITH Statement.
The record designator in a WITH statement can be a call to a function
that returns a record as its result, or a structured constant.
Numeric Conversion Functions.
The functions
binary, octal,
and
hex
convert a parameter of type string
or PAC, or a string literal, to an integer. These functions interpret
the parameter the following ways:
* Binary interprets the parameter as a binary value.
* Octal interprets the parameter as an octal value.
* Hex interprets the parameter as a hexadecimal value.
Modules.
HP Pascal supports separately compiled program fragments called
modules
.
Modules can be used to satisfy the unresolved references of another
program or module. Typically, a module "exports" types, constants,
variables, procedures, and functions. A program can then "import" a
module to satisfy its own references.
This mechanism allows commonly used procedures and functions to be
compiled separately and used by more than one program without having to
include them in each program.