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
/
CPM
/
ZCPR33
/
A-R
/
FOR-NXT2.LBR
/
CLRCST.HZP
/
CLRCST.HLP
Wrap
Text File
|
2000-06-30
|
2KB
|
44 lines
:
CLRCST.COM
----------
CLRCST can be used to improve the utility of custom shells created as
aliases and installed with SHSET. Standard ZCPR3 does not allow
memory-resident flow control commands to be processed properly in this
situation. Rather than modifying your ZCPR3 code, you can use CLRCST to
remedy this defect.
All that is necessary is to run CLRCST (Clear-Console-Status) before
any flow control commands are executed in the shell-alias. For example,
create the following alias called TEST:
ECHO DO IT AGAIN?;IF IN;ECHO OK, AGAIN;ELSE;ECHO DONE;FI
and run it with the command:
SHSET TEST
CLRCST
If your system is standard ZCPR3, it should halt with an error message
(or possibly loop forever) upon encountering the ELSE clause (or possibly
the IF clause if IF.COM is not available). If it does, insert the command
CLRCST at the beginning of the alias and try it again.
One application of this feature is with FOR/NEXT processing, as shown
by the following example alias:
CLRCST
NEXT VAR
RESOLVE IF -%VAR=-
SHCTRL P
ELSE
<additional commands, possibly using the variable>
FI
This technique can be applied wherever definite or indefinite command
loops are required.