Echo with the p1 option, How to use branching and subroutines – Gasboy CFN III Mgnr's Mnl V3.4 User Manual
Page 216
Advanced Command Files
Page 200
MDE-4315 CFN Series CFN III Manager’s Manual for Windows NT · August 2004
The keyboard, remote, and console sources each have their own file of user
variables, %a-%z. (Cron commands use the console’s file of user variables.)
These three sets of user variables are stored in hidden files on the RAM disk
called CMD1.VAR, CMD2.VAR, and CMD3.VAR.
Therefore, it is important to realize that %a in a console command file is not the
same variable accessed by, for instance, typing ECHO %a on the keyboard or
from a remote computer.
ECHO with the p1 Option
If you use the SET_VAR command to store a number with decimal values in a
percent variable, the ECHO command will display that number without a
decimal point. For example, if you set x =M 1.23, and then enter the command
echo %x, the display will show 123, not 1.23.
Use the p1 option to display numbers with decimal points, such as a dollar
amount of $1.23 or a quantity amount of 1.234 gallons. Note that a number of
digits can be represented using “<@#M>” where the number symbol represents
the number of characters, including the decimal point and a space, between <
and > .
In the first line of the example, note that there is a space before the equals sign
(=), but not after.
New for internationalization, a number can be formatted into a user variable
using the same format options available for the p1 option. This converts the
internal format of numbers in command files (which do not have decimal points
in them) in to 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’.
How to Use Branching and Subroutines
The command GOTO allows branching to arbitrary locations in a command file.
The format of GOTO is:
GOTO [-Svar|-Rvar] label
The format of label is:
*label: any comments here
P* SET x =M 1.23
↵
P* SET
↵
x = “123”
P* ECHO %x
↵
123
P* ECHO;p1=”Money=@M” %x
↵
Money=1.23
P*