Sharp OZ-707 Operation Manual - Page 30

Labelled Programs, BASIC Commands, Direct Commands, Modes

Page 30 highlights

You can use the AUTO command to automatically insert line numbers for you. Each time you press the IENTER I key, a new line number, with the correct increment, will be automatically inserted. See the BASIC COMMAND DICTIONARY for a full description of this useful function. It's wise to allow increments of several numbers in your line numbering (10, 20, 30, ... 10, 30, 50, etc.). This enables you to insert additional lines if necessary. If you use the same line number, the old line with that number is deleted when you enter the new line. Labelled Programs Often you will want to store several different programs in the memory at one time. (Remember that each must have unique line numbers). Normally, to start a program with a RUN or GOTO command, you need to remember the beginning line number of each program. However, there is an easier way. You can label each program with alphanumeric characters and run the program. Label the first line of each program that you want to reference. The label consists of a letter and up to 19 alphanumeric characters in quotes or with :+: in front of it, followed by a colon: 10: :+:A: PRINT "FIRST' 20: END 80: "B": PRINT "SECOND" 90: END Although both :+:Iabel and "label" forms may be used, :+:Iabel is recommended, since it executes more quickly and is more visible in the program listing. BASIC Commands All BASIC statements must contain commands. They tell the Card what action to perform. A command is contained with a program, and as such is not acted upon immediately. 48 Some statements require or allow an operand: 10: DATA "HELLO" 20: READ B$ 30: PRINT B$ 40: END Operands provide information to the Card telling it what data the command will act upon. Some commands require operands, while with other commands they are optional. Certain commands do not allow operands. (See the BASIC COMMAND DICTIONARY for BASIC commands and their uses.) Note: Commands, functions and variables entered in lowercase characters will be converted to uppercase characters. Direct Commands Direct commands are instructions to the Card that are entered outside of a program. They instruct the Card to perform some immediate action or set modes that affect how your programs are executed. Direct commands have immediate effect - as soon as you complete entering direct commands (by pressing the [fNTER I key), the command will be executed. Direct commands are not preceded by a line number. RUN NEW RADIAN Modes You will remember that you can use the Card as a calculator in the RUN mode. The RUN mode is also used to execute the programs you create. The PRO mode is used to enter and edit your programs. 49

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128

You can use the
AUTO
command to automatically insert line numbers
for you. Each time you press the
I
ENTER
I
key, a new line number, with
the correct increment, will be automatically inserted. See the BASIC
COMMAND DICTIONARY for a full description of this useful function.
It's wise to allow increments of several numbers in your line numbering
(10, 20, 30, ... 10, 30, 50,
etc.). This enables you to insert additional
lines if necessary.
If you use the same line number, the old line with that number is
deleted when you enter the new line.
Labelled Programs
Often you will want to store several different programs in the memory
at one time. (Remember that each must have unique line numbers).
Normally, to start a program with a RUN or GOTO command, you
need to remember the beginning line number of each program.
However, there is an easier way. You can label each program with
alphanumeric characters and run the program.
Label the first line of each program that you want to reference. The
label consists of a letter and up to
19
alphanumeric characters
in
quotes or with
:+:
in front of
it,
followed
by
a colon:
10:
:+:A:
PRINT "FIRST'
20:
END
80: "B": PRINT "SECOND"
90: END
Although both
:+:Iabel
and "label" forms may be used,
:+:Iabel
is
recommended, since it executes more quickly and is more visible in the
program listing.
BASIC Commands
All BASIC statements must contain commands. They tell the Card what
action to perform. A command
is
contained with a program, and as
such is not acted upon immediately.
48
Some statements require
or
allow
an
operand:
10: DATA "HELLO"
20:
READ B$
30:
PRINT B$
40:
END
Operands provide information to the Card telling it what data the
command will act upon. Some commands require operands, while with
other commands they are optional. Certain commands do not allow
operands. (See the BASIC COMMAND DICTIONARY for BASIC
commands and their uses.)
Note:
Commands, functions and variables entered
in
lowercase characters
will be converted to uppercase characters.
Direct Commands
Direct commands are instructions to the Card that are entered outside
of a program. They instruct the Card to perform some immediate action
or set modes that affect how your programs are executed.
Direct commands have immediate effect -
as soon as you complete
entering direct commands (by pressing the
[fNTER
I
key), the command
will be executed. Direct commands are not preceded by a line number.
RUN
NEW
RADIAN
Modes
You will remember that you can use the Card as a calculator in the
RUN mode. The RUN mode
is
also used to execute the programs you
create. The PRO mode is used to enter and edit your programs.
49