home *** CD-ROM | disk | FTP | other *** search
- *
- * KEY.CMD
- *
- * Test the IF KEY functions including responses from previous AnyKey
- * commands. This is somewhat useful for logical branching.
- *
- * This is an example of doing menus
- *
-
- Label Top
- OnError Ignore // This comment should be ignored
-
- * Print the Menu
- Clear
- Display // This comment should be ignored
-
- Current Time: &TIME Date: &DATE
-
- Enter:
- A - For Option A
- B - For Option B
- C - For Option C
-
-
- EndDisplay
-
- *
- * Get the Response
- *
- AnyKey Local "Enter Option ABC or [RETURN] to Exit"
-
- If Key ABC // This comment should be ignored
- If Key A
- AnyKey Local "A - is a good choice ..."
- Goto Top
- EndIf
- If Key B
- AnyKey Local "B - is a good choice ..."
- Goto Top
- EndIf
- If Key C
- AnyKey Local "C - is a good choice ..."
- Goto Top
- EndIf
- EndIf
-
- If Key ^M // This comment should be ignored
- AnyKey Local "Pressed [RETURN] Exiting ..."
- Clear
- Exit
- EndIf
-
- // Else some invalid choice
- AnyKey Local "Invalid Choice ... Press [RETURN]" // This comment should be ignored
- Goto Top
-
-