home *** CD-ROM | disk | FTP | other *** search
-
- ╔════════════════════════╗
- ║ ANSWER ║
- ║ ║
- ║ VER. 1.0 ║
- ║ ║
- ║ By: FRANK SCHWEIGER ║
- ║ ║
- ║ 2/1/86 ║
- ║ ║
- ╚════════════════════════╝
-
- Have you ever wanted to ask a question and get an answer that you could
- use in a batch file? This program is the ANSWER.
-
- I needed to ask for a directory and program name in a batch file I was
- writing, and discovered there was absolutly no way to do it. I wrote
- ANSWER to fill that need.
-
- The syntax for using ANSWER is:
-
- ANSWER [optional prompt]
-
- ANSWER will display the optional prompt, and then accept input from the
- keyboard. It will place the input in your CURRENT ENVIRONMENT AREA in a
- field named ANSWER. If "ANSI.SYS" has been loaded, the optional prompt may
- contain any valid ANSI sequences to position the cursor, change color, etc.
-
- The user must have been previously notified that keyboard input is expected
- or you must include the optional prompt to do so. If the optional prompt is
- not present, ANSWER will NOT DISPLAY ANYTHING that would inform the operator
- that input is expected.
-
- Parameters in the ENVIRONMENT AREA may be accessed similarly to command
- line parameters. See the following examples for clarification:
-
- ANSWER Enter the full filespec for the source file:
- COPY %ANSWER% junk.dst
-
- ANSWER Enter the Drive the source file is on (including :)-
- SET DRIVE=%ANSWER%
- ANSWER Enter the path the source file may be found in (including following \)-
- SET COPYPATH=%ANSWER%
- ANSWER Enter the Source filename-
- COPY %DRIVE%%COPYPATH%%ANSWER% junk.dst
-
- Note: The second example uses 3 parameters in the ENVIRONMENT AREA. If you
- have not expanded your ENVIRONMENT AREA, you may run out of space.
-
- ANSWER also sets a return code which can be examined by the ERRORLEVEL
- option of the IF statement. ERRORLEVEL will be 0 if ANSWER was sucessful,
- or 1 if there was insufficient room or the ENVIRONMENT AREA was corrupted.
-
-
- This program is provided "as is" without warranty of any kind, either
- expressed or implied, including, but not limited to, implied warranties of
- merchantability or fitness for a particular purpose. The entire risk as
- to the results and performance of the program is assumed by the user.
- Should the program prove defective, the user assumes the entire cost of all
- necessary servicing, repair or correction.
-
- This program is donated to the PUBLIC DOMAIN, and may be freely copied
- without any restrictions.
-
- Comments or suggestions may be forwarded to:
-
- Frank Schweiger
- 10083 Heytesbury Ln.
- Sandy, Ut. 84092
-
- I can also be reached on the STATION ZEBRA Bulletin Board in Salt Lake
- City, Utah at (801) 561-4652.