PACK


General Form:
pack.gif

Where:
pack1.gif


The PACK statement is used to store a list of numeric values in an alphanumeric variable in packed decimal format using the format specified by the image.

The image consists of `#' characters to signify a single digit, and optionally, plus signs, minus signs, decimal points, and up arrows may be used to specify sign, decimal point position, and exponential format. Embedded commas are ignored. The image can either be fixed point `###.##' or exponential `#.###^^^^'. Values are packed as follows:

Examples of bytes used by PACK for certain images.

PACK image Bytes
# 1
### 2
##.## 2
-####.## 4
##.##^^^^ 3


Syntax examples:

PACK(###.###) file$ FROM total
PACK(+###.####) FLD(record$.cost$) FROM cost/2
PACK(form$) file$ FROM price()