home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ZSYS
/
ZSYSARK
/
Z3HLP01.ARK
/
I.LBR
/
IFCOM.HZP
/
IFCOM.HLP
Wrap
Text File
|
1990-03-23
|
9KB
|
195 lines
;
IF.COM
Size (recs) CRC Version Author/Latest Issue Disk
IF.COM 4k (29) 4BEC 1.5 Howard Goldstein 6/89 Z3COM4
IF.3OM 4k (29) 528C 1.5 Howard Goldstein 6/89 Z3COM4
IF.4OM 5k (35) BC5B 1.5 Howard Goldstein 6/89 Z3COM4
1- Syntax/Options 2- Notes 3- Err Msgs 4- Examples of Use 5- Help File
IF is the transient counterpart of the FCP-resident IF command. IF.COM
tests the indicated condition to see if it is TRUE and, if so, sets the Flow
State to TRUE (allowing the following commands to execute). If FALSE, the
Flow State is set to FALSE (allowing only Flow Commands to execute).
IF.COM is invoked if the current FCP has the IF.COM facility enabled. If
so, when an IF command is issued, the FCP loads IF.COM from the ROOT directory
into memory and executes it. The command tail is passed to IF.COM, and IF.COM
acts as a conventional COM file.
:1
Syntax (1) IF ARG1=ARG2
(2) IF REGISTER# [value]
(3) IF CONDITION ARGUMENTS
In form (1), the arguments are tested for literal equality and must match
character for character. No space is permitted preceeding or following the
equal sign. A more flexible comparison is provided by using form (3) with the
comparison conditions, i.e. IF EQ ARG1 ARG2 or IF = ARG1 ARG2. This form
permits the use of the condition set EQ, NE, GT, GE, LT, LE as well as their
symbolic equivalents =, <> or ><, >, >=, <, <=.
In all forms which permit or require the use of numeric values such as form
(2) or the VALUE and REG conditions, numeric entry may be specified as octal,
binary or hexadecimal by suffixing the letters o, b or h to the number.
In form (3), only the first two letters of the condition are signifigant.
A '~' may be used to negate all conditions in forms (2) and (3).
Options - 1/5
T - Flow State set to unconditionally to TRUE
F - Flow State set unconditionally to FALSE
AMBIG fnme - Flow state set TRUE if file name is ambiguous
ARCHIVE fnme - Flow state set TRUE if archive attribute set
BG - Flow state set TRUE if BackGrounder present
COMPR fnme - Flow state set TRUE if file is squeezed or Crunched
DS - Flow state set TRUE if DateStamper present
EMPTY afn,... - if all files in indicated list are EMPTY (size is 0k),
Flow State is set to TRUE
Options - 2/5
ERROR [value] - if ZCPR3 error flag is set, Flow State is set to TRUE. If
value is present, flow state is set TRUE only if error
number matches value.
EXIST afn,... - if all files in the list exist, Flow State is set to TRUE
INPUT [text] - user input is enabled, and if user strikes T, Y, <cr>, or
<sp>, Flow State is set to TRUE. Text appears as a prompt and
may use '^' to generate control characters, %< to display
upper case and %> to display lower case.
LIST tail - Flow state set TRUE if tail contains items separated by commas
NULL afn - if no 'afn' (field is blank), then Flow State is set to TRUE
Options - 3/5
PAUSE n [text]- where "n" is the number of seconds to wait before assuming
TRUE and "text" is the text to be displayed as in IF INPUT.
"N" must be greater than 0.
REG m op n - Flow state set TRUE if expression is true. M is a register
number, n is a test value and op is a member of the operator
set =, <>, ><, >, >=, <, <=. All can be negated with '~'.
RO fnme - Flow state set TRUE if file Read Only attribute set
SHELL [name] - Flow state set TRUE if a shell is on shell stack. If name is
present, it is compared to the name on the top of the shell
stack and the flow state set TRUE if they match. Name may
ambiguous.
SYS fnme - Flow state set TRUE if file Sys attribute set
TAG fnme n - Flow state set TRUE if attribute n set in file name.
Options - 4/5
TCAP [string] - if a Z3TCAP is installed, Flow State is set to TRUE. If
string is present it is compared to the TCAP ID string (up
to the length of the former) and the flow state set TRUE if
they match. String may contain '?' wildcards.
VALUE m op n - Flow state set TRUE if expression is true. M and n are values
and op is an operater from the set =, <>, ><, >, >=, <, <=.
All can be negated with '~'.
WHEEL - if WHEEL byte set, Flow State is set to TRUE
ZEX - Flow state set TRUE if ZEX is running
reg# value - if reg (0-9) has indicated value (0-255), Flow State is
set to TRUE
afn1=afn2 - if two afns are identical in name, Flow State is set to TRUE
Options - 5/5
A leading tilde (~) char before a condition negates the effect of the
condition. If the condition is FALSE, the Flow State is set to TRUE. For
each condition, only the first two chars are significant (eg. NU for NULL).
Examples: "IF ~T" is the same as "IF F"
"IF ~NULL arg" is TRUE if 'arg' is non-blank
"IF ~EXIST afn,..." is TRUE if 'afn,...' do NOT
exist (AFN and AFN ... must each not exist)
For each condition given, only the first two characters are significant
(eg, NU for NULL).
:2
IF Notes
a. Under NZFCP (NZCOM/ZCPR34), IF.COM is invoked only if the indicated
condition is NOT included in the condition set available with the
resident FCP. Typing ":IF" will invoke IF.COM directly.
b. Vs 1.5 updates:
- The IF PAUSE test has been added. It is similar to IF INPUT, except
that the function returns TRUE if the user does not respond within a
specified time interval.
- It is now possible to highlight text displayed by IF INPUT and IF
PAUSE. Use ctrl-a to turn standout mode on and ctrl-b to turn it off as
in other Z-System utilities.
- The register test routines have been modified to handle all registers,
0..31.
- The tests that do file lookups, (EXISTS, EMPTY, RO, etc), have been
changed to work correctly under Z3PLUS. When running under ZSDOS, the
DOS path will no longer be searched if the specified file cannot be
found in the specified directory. Files found via ZS/ZDDOS Public are
ignored unless the program is re-assembled with the IGNZDPUB option set
False.
:3
Error Messages
IF.COM generates several error messages relating to improper entry of
condition arguments. These messages are self-explanatory. See the help for
IF.COM Options for correct syntax for each condition.
"No IF Condition Given" <-- the condition expressed was not one of
the valid conditions.
'IF overflow' <-- indicates a nesting beyond the permitted
8 levels.
:4
Examples of Use - 1/2
a. IF NULL $1
- if the indicated parameter (from within a SUBMIT or ZEX command file)
is not provided, set the Flow State to TRUE
b. IF ~EXIST ZEX.ASM,ZEX.ZEX
- if any one of these files does not exist, Flow State is set to TRUE
c. IF EXIST ZEX.ASM,ZEX.ZEX
- if any one of these files does not exist, Flow State is set to FALSE
(i.e., all files must exist for a TRUE Flow State)
d. IF NEC=$1
- if the first passed parameter is the same as the file name "NEC.",
then the Flow State is Set to TRUE
e. IF 5 7h
- if Register 5 = 7 hexidecimal, the Flow State is Set to TRUE
Examples of Use - 2/2
f. IF LT $1 FEE
- if the first passed parameter preceeds 'FEE' in alphabetical order,
the flow state is set to TRUE.
:5
IF.HLP
Size (recs) CRC Version Author/Latest Issue Disk
8k 2C8A n/a Z3HLP1
==============================================================================
Original Z-System HELP file on 'flow-control' commands (IF, IF.COM,
IFSTAT.COM, ELSE, FI, XIF, etc.).