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 / BEEHIVE / ZSUS / Z3HELP-2.LBR / G.LBR / GETVAR.HZP / GETVAR.HLP
Text File  |  2000-06-30  |  6KB  |  143 lines

  1. ;
  2.                                  GETVAR.COM                                   
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5.                3k (22)   1ADF  1.4        R. Nielsen 08/89         Z3COM4 
  6.  
  7.   1- Syntax  2- Input Editor  3- Notes  4- Examples of Use  5- Help File      
  8.  
  9.  
  10.    GETVAR will print a user-defined prompt, accept a line of input, and assign
  11. that line of input to  a user-defined  shell variable in  SH.VAR  on the ROOT:
  12. directory. 
  13. :1
  14.  
  15.    Syntax:  GETVAR <varname> <prompt text>
  16.  
  17.    Only the first eight characters of the variable name are significant.  
  18.  
  19.    The prompt text  will be printed left-justified on the console, followed by
  20. a space.  The user's response will  be entered at this point.  Typing a Ctrl-C 
  21. in the first position  on  the line will abort operation.  The contents of the
  22. shell variable will then be unchanged.  If  a  Ctrl-C  is struck  in any other
  23. position, it will be inserted in the line.  If a response is  to have a Ctrl-C
  24. in the first position, put  it in any position but the first,  then delete the
  25. chars in front of it.
  26.  
  27.    Control flags for inclusion in the prompt string:
  28.  
  29.    %>  -  switch to lowercase
  30.    %<  -  switch to uppercase
  31.    ^   -  treat next character as a ctrl character (^A is Ctrl-A)
  32.  
  33. Any character other than < or > following "%" is displayed literally.
  34. :2
  35.  Input Editor - 1/2 
  36.  
  37.    The input editor control keys are:
  38.  
  39.    ^S or left-arrow key if defined in TCAP   <--  move left one char
  40.    ^D or right-arrow key if defined in TCAP  <--  move right one char
  41.    ^E  <-- erase to [E]nd of line
  42.    ^U  <-- delete char [U]nder cursor
  43.    ^W  <-- delete [W]ord forward
  44.    ^X  <-- kill entire line
  45.   DEL  <-- delete char before cursor
  46.   TAB  <-- move to end of line, or if at end, to beginning
  47.    ^A  <-- move to beginning of previous word
  48.    ^F  <-- move to beginning of next word 
  49.    ^H  <-- delete char before cursor
  50.    ^Q  <-- [Q]uote next char -- insert char literal
  51.    ^C  <-- abort if at beginning of line
  52.  Input Editor - 2/2 
  53.  
  54.    The input editor  scrolls  the  entered  text  within  the remainder of the 
  55. physical line  following  the prompt,  allowing  you  to  move and edit freely 
  56. within the line.  You may enter up to 127 chars.  Prompts  may be  longer than
  57. the screen width.  
  58.  
  59.    Cursor  keys  are  evaluated  first,  and  may mask later functions.  These
  60. editor commands are identical to those  used  in SH20,  except of course, that
  61. command history recall  is  not possible  from within GETVAR,  and ^X will not
  62. allow you to exit from GETVAR.
  63. :3
  64.  GETVAR Notes - 1/3 
  65.  
  66.    a. Shell variables created with GETVAR have two features that those created
  67.       with SHVAR do not.
  68.  
  69.       o   Shell variable text may be lowercase (names will be uppercase).
  70.  
  71.       o   Shell variable text may be a  Multiple-Command Line.
  72.  
  73.       The first  of these features may  be useful when non-standard  utilities
  74.       are used to retrieve and display a shell variable.   A  command  such as
  75.  
  76.                                ECHO %<varname>
  77.  
  78.       will always result in a capitalized display of the variable.  The second
  79.       of  these features  has potentially  many uses,  giving  shell variables 
  80.       almost the power of aliases (remember that references to shell variables
  81.       may be nested).
  82.  GETVAR Notes - 2/3 
  83.  
  84.    b. GETVAR does not check to see that the user is a Wheel,  but does provide
  85.       a 'secure' input editor.   That is, the user cannot abort the program by
  86.       striking a control-C at the beginning  of the input line.   The  program 
  87.       may therefore  be  suitable  for  use  in  secure  systems,  although  a 
  88.       malicious  user who can invoke the program  at will could  still corrupt 
  89.       the SH.VAR file.
  90.  
  91.    c. GETVAR abides by  the  Quiet  Flag,  except for  the  display  of  error 
  92.       messages,  and  will set the Program Error Code byte if  it is unable to
  93.       create or write the shell variable file.
  94.  
  95.    d. The only option supported is the display of a help message.
  96.  
  97.    e. The  meanings  of  existing  variables  in  SH.VAR   can  be  edited  by 
  98.       SHDEFINE.COM.
  99.  GETVAR Notes - 3/3 
  100.  
  101.    f. Vs. 1.2 updates
  102.       - Incorporated scrolling line editor instead of SYSLIB's INLINE.  Cntl-C
  103.         aborts with no change to shell variable.
  104.   
  105.    g. Vs. 1.3 updates
  106.       - Fixed bug causing SH.VAR file sometimes not to be updated.  Added ECHO
  107.         routine to allow display of lower-case letters in prompt.   Display of
  108.         sign-on banner no longer controlled by  quiet flag  (only printed when
  109.         help is requested).  Linked with new Vs 4 LIBs.
  110.  
  111.    h. Vs. 1.4 updates
  112.       - Moved uninitialized storage to DSEG.  Increased local stack size.
  113. :4
  114.  Examples of Use 
  115.  
  116.    a. GETVAR run What do you wish to run?<cr>   <-- you enter at command line
  117.       What do you wish to run? DIR$|VFILER<cr>  <-- prompt shows, you respond
  118.       RESOLVE %run<cr>                          <-- you enter variable name
  119.         --> DIR is run followed by VFILER       <-- computer does this
  120.  
  121.       Variables are equated to  (replaced by) command line  text  of up to 126
  122.       characters.   In this example 'run' equals to running  DIR  followed  by
  123.       running VFILER.
  124.  
  125.    b. Get Help alias:
  126.  
  127.       HELP:;ROOT:dir14 $.h?p h;ROOT:quiet s;ROOT:getvar ghelp enter   <<
  128.       desired help file by name -;ROOT:resolve hlp %ghelp;ROOT:quiet r;$d$u:
  129.  
  130.       GETVAR in the above alias  places the  operator's response  for 'desired
  131.       help file' into  a variable named 'ghelp' which is located automatically
  132.       in the ROOT: file SH.VAR.   RESOLVE sets  up  the  main  command string,
  133.       expanding the 'ghelp' variable.  
  134. :5
  135.  
  136.                                  SHUTILS.HLP 
  137.  
  138.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  139.                8k (55)   C26B  n/a        Dreas Nielsen 4/86       Z3COM4 
  140. ==============================================================================
  141.  
  142.    Z-System HELP file for GETVAR and RESOLVE shell utilities.
  143.