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 / ALIAS11.LBR / ALIAS11.HZP / ALIAS11.HLP
Text File  |  2000-06-30  |  4KB  |  167 lines

  1. ;
  2.  
  3.                   The ZCPR3 ALIAS Facility
  4.  
  5.                    A - The ALIAS Command
  6.  
  7.                      E - ALIAS Examples
  8.  
  9.                S - Summary of ALIAS Variables
  10.  
  11. :A
  12.  
  13. Command:  ALIAS 1.1
  14.  
  15. Syntax:
  16.  
  17.      ALIAS          <-- Define New Command
  18. or
  19.      ALIAS dir:ufn  <-- Redefine Old Command
  20.  
  21. Function:
  22.  
  23.      Thσá ALIA╙ facilit∙ i≤ thσ scrip⌠ expansioε utilit∙á oµ ì
  24. ZCPR3«á  Aε Alia≤ i≤ ß CO═ filσ createΣ b∙ thσ ALIA╙ prograφ ì
  25. whicΦáá contain≤áá onσá o≥á morσá command≤áá (separateΣáá b∙ ì
  26. semicolons⌐ t∩ bσ placeΣ iε thσ CommanΣ Linσá Buffer«á  Wheε ì
  27. thσá Alia≤ i≤ invoked¼á parameter≤ froφ thσ commanΣ linσ arσ ì
  28. implanteΣá int∩ thσ scrip⌠ containeΣ withiε thσá Alias¼á anΣ ì
  29. thσá resultinτ ne≈ commanΣ linσ i≤ placeΣ int∩á thσá CommanΣ ì
  30. Linσ Buffe≥ anΣ executed.
  31.  
  32.  
  33. Options:
  34.      None
  35.  
  36. Comments:
  37.  
  38.      ZCPR│ MUS╘ bσ implementeΣ witΦ aε Externa∞ CommanΣ Linσ ì
  39. Buffer in order for ALIAS to work.
  40.  
  41.      Thσá scrip⌠á oµá thσá interna∞á commanΣá linσá support≤ ì
  42. paramete≥á passinτ iε ß manne≥ simila≥ t∩ ZE╪ anΣ SUB«á  Thσ ì
  43. variable≤á $n¼á wherσ ░ <╜ ε <╜ 9¼á ma∙ bσ placeΣá int∩á thσ ì
  44. script¼ anΣ thσ correspondinτ parameter≤ wil∞ bσ substituteΣ ì
  45. fo≥ thσ indicateΣ variables«  Thσ variablσ $░ i≤ thσ namσ oµ ì
  46. thσ Alia≤ itself«  Thσ variablσ $¬ i≤ thσ entirσ tai∞ oµ thσ ì
  47. command line.
  48.  
  49.  
  50.      Tw∩á additiona∞ variables¼á $─ anΣ $U¼á arσá available«  ì
  51. $─á expand≤ int∩ thσ lette≥ oµ thσ disδ whicΦ wa≤ loggeΣá iε ì
  52. a⌠á thσ timσ thσ Alia≤ wa≤ expandeΣ (thσ homσ disk)¼á anΣ $╒ ì
  53. expand≤ int∩ ß numbe≥ (iε ASCI╔ chars⌐ representinτ thσ use≥ ì
  54. areß whicΦ wa≤ loggeΣ iε a⌠ thσ timσ thσ Alia≤ wa≤á expandeΣ ì
  55. (the home user).
  56.  
  57.      Thσá ZCPR│ Systeφ filσ name≤ arσ availablσ t∩ thσ Alia≤ ì
  58. a≤ thσ variable≤ $Fε anΣ $Nn¼ wherσ ▒ <╜ ε <╜ 4«  $F▒ refer≤ ì
  59. t∩ FILENAME.TY╨ oµ Systeφ Filσ 1¼á $N▒ refer≤ t∩ FILENAM┼ oµ ì
  60. Systeφ Filσ 2¼á etc«á  Notσ tha⌠ thσ SETFIL┼ commanΣ i≤ useΣ ì
  61. to define the contents of the System file names.
  62.  
  63.      '$$' expands into a single '$'.
  64.  
  65.  
  66.                  Summary of Alias Variables
  67.  
  68.      $0  - Name of Alias
  69.      $n  - Parameter from Command Line (1 <= n <= 9)
  70.  
  71.      $*  - Tail of Command Line (everything after the verb)
  72.  
  73.      $D  - Home Disk
  74.      $U  - Home User
  75.  
  76.      $Fn - FILENAME.TYP of System File n (1 <= n <= 4)
  77.      $Nn - FILENAME of System File n
  78.  
  79.      $$  - The character '$'
  80.  
  81.  
  82. Selected Error Messages:
  83.  
  84.      "Ovfló mean≤ tha⌠ thσ expandeΣ commanΣá line¼á combineΣ ì
  85. witΦá thσá remainde≥á oµ thσ content≤ oµá thσá commanΣá linσ ì
  86. buffer, is too long to fit in the command line buffer.
  87.  
  88. Examples of Use:
  89.  
  90.      ALIAS
  91.           -- define Alias
  92.  
  93.      ALIAS alias
  94.           -- display script of "alias.COM" and edit
  95.  
  96. :S
  97.  
  98.                  Summary of Alias Variables
  99.  
  100.      $0  - Name of Alias
  101.      $n  - Parameter from Command Line (1 <= n <= 9)
  102.  
  103.      $*  - Tail of Command Line (everything after the verb)
  104.  
  105.      $D  - Home Disk
  106.      $U  - Home User
  107.  
  108.      $Fn - FILENAME.TYP of System File n (1 <= n <= 4)
  109.      $Nn - FILENAME of System File n
  110.  
  111.      $$  - The character '$'
  112.  
  113. :E
  114.  
  115.                     Examples of Aliases
  116.  
  117. Case 1:
  118.  
  119.      Thσá use≥ i≤ constantl∙ issuinτ thσ followinτá command≤ ì
  120. in the order indicated:
  121.  
  122.           ASM myfile.BBZ
  123.           LOAD myfile
  124.  
  125.      He can generalize it with the following Alias script:
  126.  
  127.           ASM $1.BBZ;LOAD $1
  128.  
  129.      If this Alias is named MYASM.COM, then typing
  130.  
  131. "MYASM test" will be equivalent to "ASM test.BBZ;LOAD test"
  132.  
  133.  
  134. Case 2:
  135.  
  136.      Thσá use≥ ha≤ tw∩ printer≤ oε hi≤ system«á  Hσ i≤ usinτ ì
  137. redirectablσ I/╧ a≤ implementeΣ unde≥ ZCPR3¼á anΣ hσ ha≤ tw∩ ì
  138. version≤ oµ WorΣ Sta≥ (trademark¼á Micropro⌐ - onσ fo≥á eacΦ ì
  139. printer«á  Hσá caε creatσ aε Alia≤ containinτ thσá followinτ ì
  140. script:
  141.  
  142.        Script              Meaning
  143.  
  144.        I╞ NEC=$▓           Checδ t∩ seσ iµ 2nΣ parφ i≤ NEC
  145.             DEV L NEC      If so, assign LST to NEC
  146.             WSN $1            and run NEC version of WS
  147.        ELSE                If not ...
  148.             DEV L TTY         assign LST to TTY
  149.             WST $1            and run TTY version of WS
  150.        FI
  151.  
  152.      If the Alias was named WSTAR, then:
  153.  
  154.      "WSTAR myfile.txt"
  155.  
  156. would be equivalent to
  157.  
  158.      DEV L TTY;WST myfile.txt
  159.  
  160. and
  161.  
  162.      "WSTAR myfile.txt NEC"
  163.  
  164. would be equivalent to
  165.  
  166.      DEV L NEC;WSN myfile.txt
  167.