home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / zsus / z3help / v.lbr / VALIAS.HZP / VALIAS.HLP
Encoding:
Text File  |  1991-11-18  |  9.9 KB  |  201 lines

  1. ;
  2.                                  VALIAS.COM                                   
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5.                7k (49)   B204  0.2b       Jay Sage                 Z3COM10
  6.  
  7.   1- Syntax  2- Recursive Aliases  3- Commands                                
  8.  
  9.      VALIAS is a program for  creating new  and editing existing alias program
  10. files.  It uses the full-screen capabilities provided by the Z3 TCAP (terminal
  11. capability) facility to make it  much easier to create and edit alias scripts.
  12. Support  for  clear screen,  clear-to-end-of-line,  and  cursor  addressing is 
  13. required.
  14.  
  15.      Once VALIAS is running,  it presents prompts to the user at the bottom of
  16. the screen  and status information  at  the top of  the screen,  including the
  17. program name  VALIAS and the version number,  the alias mode,  and the default 
  18. alias file name in use.  The middle 20 lines of the screen show the individual
  19. commands of a prototype command line.  
  20. :1
  21.  
  22.    Syntax:  VALIAS [[DIR:]FILENAME]
  23.  
  24.      If VALIAS is invoked with a file name specified,  a file of that name and
  25. type COM will be  read in if it exists and if it is an alias file.   If such a 
  26. file does not exist or is not  an alias file,  then the specified name will be 
  27. used as the default output file for the creation of a new alias.   An optional
  28. directory in either  DU  or  DIR  form may  be specified.   If  a file type is 
  29. included with the name,  it will be ignored and replaced by COM.   If the file
  30. name is ambiguous, VALIAS will use the first matching file found.
  31.  
  32.    The user may enter  lines with  leading blanks to make  the alias easier to 
  33. read  (especially useful for keeping IF levels straight)  and may put multiple 
  34. commands separated  by semicolons on a single line.   When  the alias file  is 
  35. created,  leading blanks  are removed  and  the lines are concatenated  into a 
  36. single multiple command line.   The VALIAS Format command  (see below) will do 
  37. this and then redisplay the commands one per line.   If there are more than 20
  38. commands, the 20th line will include the excess commands.
  39. :2
  40.  
  41. Recursive Aliases:
  42.  
  43.    With VALIAS a new type  of alias file has been introduced.   A normal alias
  44. expands the  prototype  command  line  stored  in  it  by performing parameter
  45. substitution.  It  then  appends  any  commands  in  the multiple command line 
  46. buffer that appear after the  alias invocation and writes  the result into the 
  47. command  line buffer.   The type  of alias called recursive in VALIAS performs 
  48. the  same command line expansion,  but it flushes any other commands that were 
  49. in  the command line  buffer.  This is  useful  when an alias calls  itself or 
  50. another alias recursively so that  commands that  were not needed do not build 
  51. up in the command line after the alias and result in an overflow error.
  52.  
  53.  
  54.    Consider the schematic alias WORK with the following command sequence:
  55.  
  56.                    EDIT $1.MAC
  57.                    ASSEMBLE $1
  58.                    IF ERROR
  59.                      WORK $1
  60.                    ELSE
  61.                      LINK $1
  62.                    FI
  63.  
  64. If the  edited  file  assembles  with  no errors,  the  sequence flows through
  65. directly.   If assembly errors do occur,  however,  the alias is reinvoked.  A
  66. normal  alias  would still append the expansion of  "ELSE;LINK $1;FI"  to  the
  67. newly invoked alias.   Every cycle would  add  another copy of these commands.
  68. Not only might these superfluous commands cause a command line overflow error,
  69. but their execution would not even be wanted.  The recursive type alias solves
  70. this problem.
  71.  
  72.  
  73.  
  74.    For the technically curious,  recursive aliases are implemented as follows.  
  75. The  file VALIAS1.COM into which the prototype  command line is placed to form 
  76. the alias  contains  a  flag  near the beginning of the code  (just before the 
  77. label START)  that determines whether the  command line will be flushed later.  
  78. A byte with an 'F' precedes this flag to identify the alias  as one of the new 
  79. type.   When VALIAS  reads in an existing alias for editing,  it can determine 
  80. whether it is of the new  (VALIAS1) or old (ALIAS1) type,  and if it is of the 
  81. new type it determines the mode (normal or recursive) and sets the VALIAS flag
  82. to match.  Old type aliases default to normal type.
  83. :3
  84.  
  85. VALIAS Commands:
  86.  
  87.  
  88.    The main VALIAS command prompt at the  bottom of  the screen  waits for the
  89. user to  press one of  the following keys and  then performs the corresponding 
  90. function.
  91.  
  92.  
  93. VALIAS Commands:  C
  94.  
  95.    Clear all commands  and  begin entry  of  new  commands at line A in insert 
  96. mode.  The default alias name is not changed.
  97.  
  98.  
  99. VALIAS Commands:  D
  100.  
  101.    Delete a line in the alias.   The user will be prompted for the name of the
  102. line  to  delete (A-T).   A carriage  return  or  control- c  will  cancel the 
  103. operation;  entering  a  letter between  A  and  T in upper or lower case will 
  104. remove that line and close up the space; any other response will be ignored.
  105.  
  106.  
  107.  
  108. VALIAS Commands:  F
  109.  
  110.    Format  the  command lines,  removing leading spaces on each line and empty
  111. lines between commands and redisplaying the commands one per line.
  112.  
  113.  
  114. VALIAS Commands:  H
  115.  
  116.    Help  information is displayed  at the lower right portion of the screen if
  117. VALIAS  was assembled  with the HCMDFL  (help command flag)  set  to yes.   We 
  118. recommend  not including  this command because  it pushes  VALIAS  over the 6K 
  119. boundary and because the  commands  are self-explanatory once  they have  been 
  120. learned.   We included this  command mainly for the beta-test versions,  which 
  121. were distributed without a DOC file.
  122.  
  123.  
  124. VALIAS Commands:  I 
  125.  
  126.    Insert new command lines.   This command  prompts the  user for the command
  127. line BEFORE WHICH to  begin inserting  additional  commands.  After  the  user
  128. answers  the prompt  as with the D command,  a blank line is opened up for the 
  129. insertion at the indicated location and the cursor is placed there.  After the 
  130. new command is ended with a carriage return,  another blank line after the one 
  131. just entered is opened.  This process continues until an empty line is entered
  132. or until the last  or next to last line is reached.   Then the extra open line 
  133. is closed and the user is returned to the command prompt.  Existing contiguous
  134. commands on  lines above the insertion line  are pushed  up  by one line after 
  135. each insertion.   To prevent losing the last line,  VALIAS won't automatically 
  136. advance  to the last line unless that line is currently empty  (if you specify 
  137. the last line for an insert,  the last line will be lost).  Note that commands 
  138. do not  have to be on contiguous lines;  empty lines  may exist between filled 
  139. lines.   When the alias file is created,  these blank lines  will be closed up 
  140. automatically.  We encourage you to leave blank lines to make the structure of
  141. the alias clearer during creation.
  142.  
  143.  
  144. VALIAS Commands:  L
  145.  
  146.    Load an existing alias from disk or establish a new default name.  The user
  147. will be  prompted  for the  name of  the alias file.   If a default name is in
  148. effect as a result of a previous load or save command or as a result of a file
  149. name included  when VALIAS was invoked,  then entering  a carriage return will 
  150. select this name.   A new name with an optional directory specification of the 
  151. DU or DIR form may be given.   To cancel the load command,  enter  a control-A 
  152. and a carriage return.  If a file type is specified, it will be ignored; if an
  153. ambiguous file name is given, the matching directory entry will be used.  Once
  154. a file has been specified, the commands will be cleared and VALIAS will try to
  155. load  the  specified  file.  The load  is  performed  exactly  as  with a name 
  156. specified on the command line when VALIAS was invoked (the same code is used).
  157.  
  158.  
  159. VALIAS Commands:  M
  160.  
  161.    Mode selection.  This  command  sets  the  mode  to  create  a normal  or a
  162. recursive type alias file.  See the discussion of recursive aliases above.   A
  163. mode remains in effect until  changed  by the M command or by the loading of a 
  164. new file.  The default mode is normal.
  165.  
  166.  
  167. VALIAS Commands:  R
  168.  
  169.    Replace a command.  The user will be prompted for a line to work on as with
  170. the D command.   When  a valid  line has  been selected,  the existing command 
  171. there  (if any) is deleted,  and the cursor is placed on the line to allow the 
  172. user to enter  a replacement command.   Note that the replacement command  may 
  173. consist  of several commands separated by semicolons (no semicolon at the very
  174. end, however).   Also note that  the replacement can be done at any line,  not 
  175. only where a command existed previously or next to one.  Isolated lines can be
  176. entered at any line.
  177.  
  178.  
  179. VALIAS Commands:  S
  180.  
  181.    Save the commands into an alias file.   The user will  be prompted for  the 
  182. name of the alias file.  If a  default name  is  in effect  as  a result of  a 
  183. previous load or save  command or  as  a result of  a file name  included when 
  184. VALIAS was invoked, then entering  a carriage return will select this name.  A 
  185. new name with an optional directory specification of the DU or DIR form may be
  186. given.   To cancel the save command,  enter a control-A and a carriage return.
  187. If a file type is specified,  it will be ignored; if an ambiguous file name is 
  188. given,  the bell will ring and the prompt will be repeated.   If a file of the 
  189. given name exists,  the user will be asked if it should be overwritten.   When 
  190. the S command is completed,  the user returns to command mode to allow further 
  191. editing  of the commands.   In this  way multiple aliases can  be  created and 
  192. edited in a single session.
  193.  
  194.  
  195. VALIAS Commands:  X
  196.  
  197.  
  198.    eXit from VALIAS.   This command  or  control-c entered in response  to the
  199. main command prompt of VALIAS will terminate the session and return to ZCPR3.
  200. thσ Mos⌠ Significan⌠ Bi⌠ oµá al∞ ì
  201. bytes¼ s∩ editor≤ likσ WordStar¼ whicΦ occasionall∙ se⌠ th