PROMPT program instruction PROMPT "Enter the number of parts: ", part.count The result of executing this instruction is the display of the message Enter the number of parts: on the system terminal to ask you to type in the desired value. After you type a number and press the RETURN key, the variable part.count is set equal to the value typed, and program execution resumes. Consider changing the above instruction to: PROMPT "Enter the number of parts: ", $input Even if you enter characters that are not valid for numeric input, eV+ does not output an error message. The application program can use the various string functions to extract numeric values from the input string.
If you want to include format specifications in the string output to the terminal (such as /Cn to skip lines), you can use either the $ENCODE function or the TYPE instruction. For example, the instruction PROMPT $ENCODE(/B,/C1,/X10)+"Enter the number of parts: ", $input beeps the terminal, spaces down a line, spaces over ten spaces, outputs the string, and waits for your input. (Note that a + sign has to be used between the $ENCODE function and the quoted string because the entire output_string parameter must be a single string expression.) The following pairs of instructions are equivalent to the previous example: TYPE /B, /C1, /X10, /S PROMPT "Enter the number of parts:
", $input or TYPE /B, /C1, /X10, "Enter the number of parts: ", /S PROMPT , $input Note that /S must be included in the TYPE instructions as shown to have the prompt string output on one line, and to have the cursor remain on that line. Related Keywords GETC real-valued function READ program instruction TYPE program instruction eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 415