Action: This function tells you how much RAM is available for your program and its variables. If a program tries to use more space than is available, the OUT OF MEMORY error results.
The number in parentheses can have any value, and it is not used in the calculation.
NOTE: If the result of FRE is negative, add 65536 to the FRE number get the number of bytes available in memory. |
EXAMPLES of FRE Function:
PRINT FRE(0) 10 X = (FRE(K)-1000)/7 950 IF FRE(0)< 100 THEN PRINT "NOT ENOUGH ROOM"
NOTE: The following always tells you the current available RAM:
PRINT FRE(0) - (FRE(0) < 0)* 65536 |
Action: This statement reads each key typed by the user. As the user is typing, the characters are stored in the Commodore 64's keyboard buffer. Up to 10 characters are stored here, and any keys struck after the 10th are lost. Reading one of the characters with the GET statement makes room for another character.
If the GET statement specifies numeric data, and the user types a key other than a number, the message ?SYNTAX ERROR appears. To be safe, read the keys as strings and convert them to numbers later.
This page has been created by Sami Rautiainen. | |
Read the small print. | Last updated November 14, 1998. |