Mathematical Operations; Addition And Subtraction; Multiplication And Division - Commodore 128D User Manual

Hide thumbs Also See for 128D:
Table of Contents

Advertisement

Mathematical
Operations
Let's say that you want to add the word COMMODORE in front of the
number 128. Just move the cursor so that it is blinking on the "1" in
128. Hold down the SHIFT and INST/DEL keys until you have enough
room to type in COMMODORE (don't forget to leave enough room for
a space after the E). Then type in the word COMMODORE.
If you want to delete something in a line (including extra blank
spaces), move the cursor to the character following the material you
want to remove. Then hold down the INST/DEL key by itself. The cur
sor will move to the left, and characters or spaces will be deleted as
long as you hold down the INST/DEL key.
Renumbering a Line
You can change a line's number by duplicating the line with the new
number you want, and then erasing the old line. You can also renum
ber your entire program with the RENUMBER command.
NOTE: The RENUMBER command only changes line numbers at the
beginning of each line. It will not change line numbers within a com
mand. For example, if you type:
2 ? "MY 128 IS GREAT"
4 GOTO 2
then renumbering the program will give you:
10 ? "MY 128 IS GREAT"
20 GOTO 2
To make the program work correctly you must change line 20 to read
GOTO 20.
You can use the PRINT command to perform calculations like addi
tion, subtraction, multiplication, division and exponentiation. You
type the calculation after the PRINT command.
Addition and Subtraction
Try typing these examples:
PRINT 6 + 4
PRINT 50-20
PRINT 10 + 15-5
PRINT 75-100
PRINT 30 + 40,55-25
PRINT30 + 40;55-25
i
/
t
/
U
36
USING C128 MODE—Getting Started in BASIC

Advertisement

Table of Contents
loading

Table of Contents