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
Text File  |  2000-06-30  |  2KB  |  44 lines

  1.  
  2.                                 CLRCST.COM
  3.                                 ----------
  4.  
  5.  
  6.      CLRCST can be used to improve the utility of custom shells created as
  7. aliases and installed with SHSET.  Standard ZCPR3 does not allow
  8. memory-resident flow control commands to be processed properly in this
  9. situation.  Rather than modifying your ZCPR3 code, you can use CLRCST to
  10. remedy this defect. 
  11.  
  12.      All that is necessary is to run CLRCST (Clear-Console-Status) before
  13. any flow control commands are executed in the shell-alias.  For example,
  14. create the following alias called TEST:
  15.  
  16.          ECHO DO IT AGAIN?;IF IN;ECHO OK, AGAIN;ELSE;ECHO DONE;FI
  17.  
  18. and run it with the command:
  19.  
  20.                                 SHSET TEST
  21.  
  22.                                                                      CLRCST
  23.  
  24.  
  25.      If your system is standard ZCPR3, it should halt with an error message
  26. (or possibly loop forever) upon encountering the ELSE clause (or possibly
  27. the IF clause if IF.COM is not available).  If it does, insert the command
  28. CLRCST at the beginning of the alias and try it again. 
  29.  
  30.      One application of this feature is with FOR/NEXT processing, as shown
  31. by the following example alias:
  32.  
  33.                CLRCST
  34.                NEXT VAR
  35.                RESOLVE IF -%VAR=-
  36.                SHCTRL P
  37.                ELSE
  38.                <additional commands, possibly using the variable>
  39.                FI
  40.  
  41.      This technique can be applied wherever definite or indefinite command
  42. loops are required. 
  43.