Introduction to BASIC
PRINT Statement
PRINT statement
Use a PRINT statement to display the result of a calculation.
Two or more expressions punctuated by commas can be written in a PRINT statement.
Example. A program that calculates 2+3 and 2-3 and displays their results.
10 PRINT 2+3, 2-3 20 END
Also, PRINT statements can be used for displaying character strings.
The characters must be put in double quotation marks.
Example.
10 PRINT "Hello!" 20 END
Example. This displays "2+3=" and the computational result of 2+3.
10 PRINT "2+3=", 2+3 20 END
[Operation]
Press F9 key or select "Run" from Run-Menu to execute a program.
[Note]
The numerals put on the left end of each line is called a line number.
Line numbers can be omitted on this BASIC.
[Note]
BASIC Programs can be written in upper or lower case.
That is, 'PRINT' can be spelled as 'Print' or 'print'.
On the ordinary state of this BASIC, the keywords are converted into upper case automatically.
Refer to PRINT