HP 3000 Manuals

PACK [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

PACK 

The PACK statement assigns the values of data from one or more variables
to one scalar string variable, in the order specified by the names of the
variables in the referenced PACKFMT statement.

Syntax 

PACK USING line_id; str_var 

Parameters 

line_id          Identifies the program line of the appropriate PACKFMT
                 statement that specifies the variables to be packed and
                 the format in which to pack them within str_var.

str_var          Scalar string variable into which variables are to be
                 packed.

When packing a string variable into str_var, if the length of the value
of the string variable in the PACKFMT is less than that string variable's
maximum length, the PACK statement blank-fills the unused portion and
packs the entire string variable.

When packing a substring into str_var, if the length of the value of the
substring in the PACKFMT is less than the length of the substring, the
PACK statement blank-fills the unused portion and packs the substring
length.

Examples 

     See the UNPACK Statement.



MPE/iX 5.0 Documentation