APP008.TXT TestPoint Application Note APP008A.TST Associated Source File example 1 APP008B.TST Associated Source File example 2 (c) Capital Equipment Corporation 1995 ________________________________________________________________ Putting the User in Control. Mapping Strings to Numbers and Numbers to Strings. ________________________________________________________________ TestPoint creates event driven applications and the obvious difference between running a DOS program and an event driven program is that the end user is in control. A DOS program prompts for data entry and controls every interaction. An event driven program patiently waits for the user to enter a value or make a choice from a range of choices provided on the screen. This is one of the fundamental ideas behind the use of an Action List in TestPoint. When the user makes a selection it creates an event which puts the Action list into action. Event driven applications commonly have to deal with a wide range of user choices, options and entries. This could lead to a long series of If/Then or If/Then/Else statements. The conditional statements appear to be necessary to determine what action to take based on the user input. However, using TestPoint's selector is a simple way to eliminate many If/Then and If/Then/Else statements. This technique allows you to condense many conditionals into a single action line. This is the way it works. Whenever you need to map a set of strings to a set of numbers or assign a list of commands to a set of menu items, choose the selector object then enter the settings such that - labels =strings or menu items available to the user values = numbers or commands you need You can now use the selector as a parameter in an action line. If the action list is the action list for the selector object, only one line is required to map the command and execute the action. This is a particularly good method for creating a set of commands for an instrument library. The TestPoint associated source files provide two practical examples. The first example maps a set of menu commands to alpha numeric instrument commands and sends the selected command to the instrument. The second example converts entered values to engineering units.