beautypg.com

Gasboy CFN III Mgnr's Mnl V3.4 User Manual

Page 214

background image

Advanced Command Files

Page 198

MDE-4315 CFN Series CFN III Manager’s Manual for Windows NT · August 2004

The variables, which are stored on the RAM disk as strings, are implemented as the contents
of the file R:CMD#.VAR, where # is a number one greater than the command processor
number. SET_VAR will create this file as a hidden file, so it will not normally be seen.

Note that when you are setting a variable with the SET_VAR command, you do not preface it
with a percent sign (%). However, when you use a variable, such as in an ECHO command
(see the example that follows this section), you do preface the variable with a percent sign.

While user variables are stored as strings, they can be used as numbers. Strings may be up to
118 characters in length.

In SET_VAR,

• M stands for configured monetary units (in the United States, the default configuration is

for two decimal places, xx.xx, for cents as hundredths of a dollar).

• Q stands for configured quantity units; the default configuration is for three decimal

places, xx.xxx, for thousandths of a unit.

• @ denotes an entry made at a terminal.

SET_VAR has the forms shown in the following chart. Note that square brackets, [ ], mean
that the contents enclosed within the pair of brackets are optional. A vertical bar, |, means or; it
separates alternatives.

variable ~ string [column [length]]

sets variable to string; if string is followed by a
blank space and a number, column, that number
is the offset into the string, from the left, before
the remainder of string will be set to variable;
(any blank spaces in the string itself must be
enclosed in quotation marks.); the second
number, length, if present, specifies how many
characters after the offset will be included in
variable

variable ? filename

sets variable to exact length in bytes of disk file
named by filename

variable # string

sets variable to length in characters of string

variable < format number

allows a number to be formatted into a user
variable using the same format options available
for the p1 option in EHCO. This is useful for
converting the internal format of numbers in
command files (which do not have decimal points
in them) into a form that can be used as input for
commands that require decimal points in the
correct place for different international formats.
For example, if the current international format is
USA:
set x < @M 12345
would place ‘123.45 into variable ‘x’.

SET_VAR Form

Function

set_var

Lists contents of all variables

set_var;i

Deletes all variables

set_var x = hello world

Stores hello world in %x

set_var x + 5

Adds 5 to current contents of %x

set_var x - 1

Subtracts 1 from current contents of %x

Argument

Function

This manual is related to the following products: