home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / australi / joc009.lzh / ANSWER.DOC < prev    next >
Text File  |  1986-02-03  |  3KB  |  87 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                          ╔════════════════════════╗
  8.                          ║         ANSWER         ║
  9.                          ║                        ║
  10.                          ║        VER. 1.0        ║
  11.                          ║                        ║
  12.                          ║  By: FRANK SCHWEIGER   ║
  13.                          ║                        ║
  14.                          ║         2/1/86         ║
  15.                          ║                        ║
  16.                          ╚════════════════════════╝
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.     Have you ever wanted to ask a question and get an answer that you could
  26. use in a batch file? This program is the ANSWER. I had need to ask for a
  27. directory and program name in a batch file I was writing, and discovered that
  28. there was absolutly no way to do it. I wrote ANSWER to fill that need.
  29.  
  30.     The syntax for using ANSWER is as follows:
  31.  
  32. ANSWER [optional prompt]
  33.  
  34.     ANSWER will display the optional prompt, and then accept input from the
  35. keyboard. It will place the input in your CURRENT ENVIRONMENT AREA in a field
  36. named ANSWER. If "ANSI.SYS" has been loaded, the optional prompt may contain
  37. any valid ANSI sequences to position the cursor, change color, etc. The user
  38. must have previously displayed some indication that keyboard input is expected
  39. or include the optional prompt to do so. If the optional prompt is not present
  40. ANSWER will NOT DISPLAY ANYTHING that would inform the operator that input is
  41. expected.
  42.  
  43.     Parameters in the ENVIRONMENT AREA may be accessed similarly to command
  44. line parameters. See the following examples for clarification:
  45.  
  46. ANSWER Enter the full filespec for the source file:
  47. COPY %ANSWER% junk.dst
  48.  
  49. ANSWER Enter the Drive the source file is on (including :)-
  50. SET DRIVE=%ANSWER%
  51. ANSWER Enter the path the source file may be found in (including following \)-
  52. SET COPYPATH=%ANSWER%
  53. ANSWER Enter the Source filename-
  54. COPY %DRIVE%%COPYPATH%%ANSWER% junk.dst
  55.  
  56.     Note: The second example uses 3 parameters in the ENVIRONMENT AREA. If
  57.           you have not expanded your ENVIRONMENT AREA, you may run out of
  58.           space. ANSWER sets a return code which can be examined by the
  59.           ERRORLEVEL option of the IF statement. ERRORLEVEL will be 0 if
  60.           ANSWER was sucessful, or 1 if there was insufficient room or the
  61.           ENVIRONMENT AREA was corrupted.
  62.  
  63.  
  64.  
  65.  
  66.        This  program  is provided "as is" without warranty  of  any
  67.        kind,  either  expressed  or  implied,  including,  but  not
  68.        limited  to  the  implied warranties of  merchantability  or
  69.        fitness for a particular purpose.  The entire risk as to the
  70.        results  and  performance of the program is assumed  by  the
  71.        user.   Should the program prove defective, the user assumes
  72.        the  entire  cost  of all  necessary  servicing,  repair  or
  73.        correction.
  74.  
  75.  
  76.        This program is donated to the PUBLIC DOMAIN, and may be freely
  77.        copied without any restrictions.
  78.  
  79.  
  80.        Comments or suggestions may be forwarded to:
  81.  
  82.                                             Frank Schweiger
  83.                                             10083 Heytesbury Ln.
  84.                                             Sandy, Ut.   84092
  85.  
  86.        I can also be reached on the STATION ZEBRA Bulletin Board in Salt
  87.        Lake City, Utah at (801) 561-4652.