The GET statement can be used to avoid some of the limitations of the INPUT statement. For more on this, see the section on Using the GET Statement in the Programming Techniques section.EXAMPLES of GET Statement:
10 GET A$: IF A$ ="" THEN 10: REM LOOPS IN 10 UNTIL ANY KEY HIT 20 GET A$, B$, C$, D$, E$: REM READS 5 KEYS 30 GET A, A$
Action: This statement reads characters one-at-a-time from the device or file specified. It works the same as the GET statement, except that the data comes from a different place than the keyboard. If no character is received, the variable is set to an empty string (equal to "") or to 0 for numeric variables. Characters used to separate data in files, like the comma (,) or <RETURN> key code (ASC code of 13), are received like any other character.
When used with device #3 (TV screen), this statement will read char- acters one by one from the screen. Each use of GET# moves the cursor 1 position to the right. The character at the end of the logical line is changed to a CHR$ (13), the <RETURN> key code.EXAMPLES of GET# Statement:
5 GET#1, A$ 10 OPEN 1,3: GET#1, Z7$ 20 GET#1, A, B, C$, D$
|This page has been created by Sami Rautiainen.|
|Read the small print.||Last updated December 22, 2002.|