Variables in INPUT Prompts

Publication

Pub Details

Date

Pages

BASIC Terms

See all articles from CATS v4 n4

This is not a new discovery but thecause it is not mentioned 2068 User Manual, I that it is not used as widely as it might be.

Variables may be included in an INPUT prompt by enclosing the prompt in parentheses. That is, with INPUT (X); B the be the prompt will the value of variable x and With INPUT (Y$);B it will be the string value of variable Y$.

It is feasible to combine numeric and string variables, along with other characters. For example, in an accounting program the prompt might be:

INPUT ("#";N;"  ";+A$(n);TAB 22;"$");B(N)

The when N=4 and when N=5 the prompts would appear as:

#4 INTEREST REC      $C
#5 DIVIDENDS REC $C

The amounts entered would be stored in B(4) and B(5) respectively.

Products

 

Media

 

Image Gallery

Source Code

Scroll to Top