MAINSAIL Language Manual, Section 48.24

previous   next   top   contents   index   framed top   this page unframed


48.24. ttyRead

Figure 48–23. ttyRead
STRING
PROCEDURE   ttyRead     (OPTIONAL POINTER($areaarea);

ttyRead reads a new line from the file TTY. area specifies the destination area for the resulting STRING if new STRING text is generated; see Section 29.4.

The character or characters that terminate the input line (e.g., eol) are discarded.

Example 48–24. Use of ttyRead
STRING      s;
INTEGER     t,u;

s := ttyRead; # read next line from TTY
read(s,t,u);  # read INTEGERs from s into t and u
              # 
(see Section 46.7)

Example 48–24 gets two INTEGERs from the same terminal input line. The user must realize that two INTEGERs are to be typed on the same line.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 48.24