|
Section 10: Programming with ALPHA Strings152
|
|
Another way to use the prompt is to use ARCL
to recall a string from a register and then use
PROMPT to halt program execution and display
the prompt string. This method requires you to store the ALPHA string
into a register for later use as a prompt string. You can either store
this string before you execute the program or you can instruct the
program to store the string. Refer to
section 5
of part I for more information about ARCL .
|
|
Example: The following program prompts for a number, stops for
the input, then computes the common logarithm of the number. The ALPHA
prompt is a line in the program.
|
|
|
|
Find the log of 8 to see how the program works:
|
|
|
|
Prompting can also be accomplished using AVIEW
(ALPHA view) and STOP in a program.
The AVIEW displays the contents of the ALPHA
register and the STOP halts program execution.
|
|
Labeling Data
|
|
Data labeling can be quite useful to the output your programs produce.
Labeled output leaves no doubt as to which result is displayed. Data can be
labeled with ALPHA strings using ASTO ,
ARCL and AVIEW . To label
ouput:
|