home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / z3help43.lbr / IFCOM.HZP / IFCOM.HLP
Encoding:
Text File  |  1991-10-19  |  8.6 KB  |  200 lines

  1. ;
  2.                                    IF.COM                                     
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5. IF.COM         4k (28)   6B0E  1.6        Howard Goldstein 10/91   Z3COM4
  6. IF.3OM         4k (28)   90C9  1.6        Howard Goldstein 10/91   Z3COM4
  7. IF.4OM         4k (32)   742E  1.6        Howard Goldstein 10/91   Z3COM4
  8.  
  9.   1- Syntax/Options  2- Notes  3- Err Msgs  4- Examples of Use  5- Help File  
  10.  
  11.    IF is  the transient  counterpart of  the FCP-resident IF  command.  IF.COM
  12. tests the indicated condition to see if it is TRUE and,  if so,  sets the Flow
  13. State to TRUE (allowing  the following commands to execute).  If the condition
  14. is  FALSE,  the Flow State is set to  FALSE  (allowing only  Flow  Commands to
  15. execute).
  16.  
  17.    IF.COM is invoked if the current FCP has the IF.COM facility  enabled.   If
  18. this is the case,  whenever an IF command is issued,  the FCP will load IF.COM
  19. from  the  ROOT  directory into memory and execute it.     The command  tail  is
  20. passed to IF.COM, and IF.COM acts as a conventional COM file.
  21. :1
  22.    Syntax   (1) IF ARG1=ARG2
  23.             (2) IF REGISTER# value
  24.             (3) IF CONDITION ARGUMENTS
  25.  
  26.    In form (1), the arguments are tested for literal equality and  must  match 
  27. character  for  character.   No space is permitted preceeding or following the 
  28. equal sign.  A more flexible comparison is provided by using form (3) with the 
  29. comparison  conditions,  i.e.   IF  EQ ARG1 ARG2 or IF = ARG1 ARG2.  This form 
  30. permits the use of the condition set EQ, NE, GT, GE, LT, LE as well  as  their 
  31. symbolic equivalents =, <> or ><, >, >=, <, <=. 
  32.  
  33.    In all forms which permit or require the use of numeric values such as form 
  34. (2) or the VALUE and REG conditions, numeric entry may be specified as  octal, 
  35. binary or hexadecimal by appending the letters o, b or h to the number.
  36.  
  37.    In form (3), only the first two letters of the condition are signifigant.  
  38.  
  39.    A '~' may be used to negate all conditions in forms (2) and (3).
  40.  Options - 1/4 
  41.  
  42. T             - Flow State set to unconditionally to TRUE
  43.  
  44. F             - Flow State set unconditionally to FALSE
  45.  
  46. AMBIG fnme    - Flow state set TRUE if file name is ambiguous    
  47.  
  48. ARCHIVE fnme  - Flow state set TRUE if archive attribute set
  49.  
  50. BG            - Flow state set TRUE if BackGrounder present
  51.  
  52. COMPR fnme    - Flow state set TRUE if file is squeezed or Crunched
  53.  
  54. DS            - Flow state set TRUE if DateStamper present
  55.  
  56. EMPTY afn,... - if all files in indicated list are EMPTY (size is 0k), 
  57.                    Flow State is set to TRUE
  58.  
  59. ERROR [value] - if ZCPR3 error flag is set, Flow State is set to TRUE.    If
  60.         value is present, flow state is set TRUE only if error
  61.         number matches value.
  62.  Options - 2/4 
  63.  
  64. EXIST afn,... - if all files in the list exist, Flow State is set to TRUE
  65.  
  66. INPUT [text]  - user input is enabled, and if user strikes T, Y, <cr>, or 
  67.                 <sp>, Flow State is set to TRUE.  Text appears as a prompt and
  68.                 may use '^' to generate control characters, %< to display 
  69.         upper case, %> to display lower case and ctl-a/ctl-b to
  70.         enable/disable screen standout mode.
  71.  
  72. LIST tail     - Flow state set TRUE if tail contains items separated by commas
  73.  
  74. NULL afn      - if no 'afn' (field is blank), then Flow State is set to TRUE
  75.  
  76. PAUSE n [text]- Like INPUT above except that Flow State is automatically
  77.         set to True if user does not respond within n seconds.
  78.  
  79. REG m op n    - Flow state set TRUE if expression is true.  M is a register
  80.         number, n is a test value and op is a member of the operator
  81.         set =, <>, ><, >, >=, <, <=.  All can be negated with '~'.
  82.  
  83. RO fnme       - Flow state set TRUE if file Read Only attribute set
  84.  Options - 3/4 
  85.  
  86. SHELL [name]  - Flow state set TRUE if a shell is on shell stack.  If name is
  87.         present, it is compared to the name on the top of the shell
  88.         stack and the flow state set TRUE if they match.  Name may
  89.         ambiguous.
  90.  
  91. SYS fnme      - Flow state set TRUE if file Sys attribute set
  92.  
  93. TAG fnme n    - Flow state set TRUE if attribute n set in file name.
  94.  
  95. TCAP [string] - if a Z3TCAP is installed, Flow State is set to TRUE.  If
  96.         string is present it is compared to the TCAP ID string (up
  97.         to the length of the former) and the flow state set TRUE if
  98.         they match.  String may contain '?' wildcards.
  99.  
  100. VALUE m op n  - Flow state set TRUE if expression is true.  M and n are values
  101.         and op is an operater from the set =, <>, ><, >, >=, <, <=.
  102.         All can be negated with '~'.
  103.  
  104. WHEEL          - if WHEEL byte set, Flow State is set to TRUE
  105.  Options - 4/4 
  106.  
  107. ZEX          - Flow state set TRUE if ZEX is running
  108.  
  109. reg# value    - if reg (0-31) has indicated value (0-255), Flow State is
  110.         set to TRUE
  111.  
  112. afn1=afn2     - if two afns are identical in name, Flow State is set to TRUE
  113.  
  114.    A  leading  tilde  (~) char before a condition negates the  effect  of  the
  115. condition.   If the condition is FALSE,  the Flow State is set to  TRUE.   For
  116. each condition, only the first two chars are significant (eg. NU for NULL).
  117.  
  118. Examples:  "IF ~T" is the same as "IF F"
  119.        "IF ~NULL arg" is TRUE if 'arg' is non-blank
  120.        "IF ~EXIST afn,..." is TRUE if any 'afn' in the
  121.         list does not exist.
  122.  
  123.    For each condition given, only the first two characters are significant 
  124. (eg, NU for NULL).
  125. :2
  126.  IF Notes - 1/2 
  127.  
  128.    a. Under NZFCP distributed with NZ-COM and ZCPR vs 3.4, IF.COM  is  invoked
  129.       only if the indicated condition is  NOT  included in the  condition  set
  130.       available with the resident FCP.  IF.COM may be invoked directly  if its
  131.       invocation is preceeded by a colon, i.e. :IF .. etc. 
  132.  
  133.    b. Vs 1.6 updates (10/13/91, Howard Goldstein):
  134.       - Functionally identical to  Vs 1.5  except  that the new  ZSLIB's video
  135.         highlighting calls are used instead of VLIB's much larger equivalents.
  136.         This results in the preferred  Type 4 IF.COM for  NZCOM and other late
  137.         model Z-Systems shrinking back under the 4K (32 record) mark.
  138.    
  139.    c. Vs 1.5 updates: 
  140.       - The IF PAUSE test has been added.   It  is similar to IF INPUT, except 
  141.       that the  function  returns  TRUE if the user does not respond within  a 
  142.       specified time interval.  
  143.       - It is now  possible to  highlight text displayed  by  IF INPUT  and IF
  144.       PAUSE.  Use ctrl-a to turn standout mode on and ctrl-b to turn it off as
  145.       in other Z-System utilities.
  146.  IF Notes - 2/2 
  147.  
  148.       - The register test routines have been modified to handle all registers,
  149.       0..31.
  150.       - The tests that do  file lookups,  (EXISTS, EMPTY, RO, etc),  have been 
  151.       changed to work correctly under Z3PLUS.   When running under ZSDOS,  the 
  152.       DOS path will  no longer  be searched  if the specified  file  cannot be 
  153.       found in the specified directory.   Files found  via ZS/ZDDOS Public are 
  154.       ignored unless the program is  re-assembled with the IGNZDPUB option set
  155.       False.
  156. :3
  157.  Error Messages 
  158.  
  159.    IF.COM generates  several error messages  relating  to improper  entry  of 
  160. condition  arguments.  These messages are self-explanatory.  See the help for 
  161. IF.COM Options for correct syntax for each condition.
  162.  
  163.    'IF overflow'              <-- indicates a nesting beyond the permitted 
  164.                                   8 levels.
  165. :4
  166.  Examples of Use - 1/2 
  167.  
  168.    a. IF NULL $1         
  169.       - if the indicated parameter (from within a SUBMIT or ZEX command file) 
  170.         is not provided, set the Flow State to TRUE
  171.  
  172.    b. IF ~EXIST ZEX.ASM,ZEX.ZEX
  173.       - if any one of these files does not exist, Flow State is set to TRUE
  174.  
  175.    c. IF EXIST ZEX.ASM,ZEX.ZEX
  176.       - if any one of these files does not exist, Flow State is set to FALSE 
  177.         (i.e., all files must exist for a TRUE Flow State)
  178.  
  179.    d. IF NEC=$1
  180.       - if the first passed parameter is the same as the file name "NEC.", 
  181.         then the Flow State is Set to TRUE
  182.  
  183.    e. IF 5 7h
  184.       - if Register 5 = 7 hexidecimal, the Flow State is Set to TRUE
  185.  Examples of Use - 2/2 
  186.  
  187.    f. IF LT $1 FEE
  188.       - if the first passed parameter preceeds 'FEE' in alphabetical order,
  189.     the flow state is set to TRUE.
  190. :5
  191.  
  192.                                     IF.HLP 
  193.  
  194.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  195.                8k        2C8A  n/a                                 Z3HLP1
  196. ==============================================================================
  197.  
  198.    Original  Z-System  HELP  file  on  'flow-control'  commands  (IF,  IF.COM, 
  199. IFSTAT.COM, ELSE, FI, XIF, etc.). 
  200.