Return to Statement


Enter Text Example

This example demonstrates the use of the TEXT statement.

$$
$$ Declarations
$$
STRING/NAME(30)
$$ OUTPUT HEADER $$
PRINT/'EMPLOYEE BIRTHDATE'
L10:TEXT/'EMPLOYEE NAME',NAME,RSP
JUMP/L10:,L30:,,,,RSP

The user might respond to the TEXT statement by entering the text BOB SMITH.

    L20:PARAM/NAME,$
'MONTH XX',INT,MONTH,$
'DAY XX',INT,DAY,$
'YEAR XXXX',INT,YEAR,RSP
JUMP/L20:,L30:,,RSP
$$ OUTPUT RESULTS $$
PRINT/NAME,ISTR(MONTH),ISTR(DAY),ISTR(YEAR)
JUMP/L10:
L30:HALT

The PARAM statement in the previous program segment displays the following cue line and dialog box:

Cue Line And Dialog Box

In the previous example, the user might enter 12 for the month, 27 for the day, and 1954 for the year. The two PRINT statements would write text to the screen as follows:

   EMPLOYEE BIRTHDATE
BOB SMITH,12,27,1954