SECTION 1
Getting Started
1-34 PEN*KEY
R
6200/6300 Hand-Held Computer Programmer’s Reference Guide
2. To force DELAY to exit after a period of time has elapsed, even if no key has
been pressed, specify a /nnnn" switch on the command line anywhere, even
within quoted text. The value of nnnn is the decimal value for how many
hundredths of seconds that must elapse before DELAY automatically exits.
The maximum delay is about 640 seconds (or about 10 minutes).
3. No command line parameter is required to cause this program to wait for a
key press. DELAY always exits whenever a key is pressed, even if it is
waiting for time to elapse first.
4. When DELAY is executed from a command shell, as opposed to being
loaded as a device driver, the error level set upon return is based on the
key, if any, that was pressed prior to exiting. The return value is
specifically geared to make it easy to tell which numeric key was pressed.
Table 1Ć6
DELAY.EXE Error Levels
Error Level
Key Pressed
0
0"
1
1"
2
2"
3
3"
4
4"
5
5"
6
6"
7
7"
8
8"
9
9"
10
:"
11
;"
12 to 154
Values returned for these keys consist of key value minus 30h.
255
No key was pressed; the time expired first.
Simple examples:
Pause
DELAY.EXE
Echo message
DELAY.EXE /0 message"
Sleep 10 seconds
DELAY.EXE /1000
Choice message
DELAY.EXE message"
IF ERRORLEVEL 3 GOTO InvalidDigit
IF ERRORLEVEL 2 GOTO PressedTwo
IF ERRORLEVEL 1 GOTO PressedOne
IF ERRORLEVEL 0 GOTO PressedZero
Echo message two
Pause
DELAY.EXE message two" Press any key to continue... "
FNDRAMD
.
COM
Identify RAM Drive
This utility identifies the drive letter that corresponds to your RAM drive. The
drive letter is returned by way of the errorlevel:
0 = No RAM drive found
1 = Drive A is the RAM drive
2 = Drive B is the RAM drive
etc.
1. Getting Started