Sharp OZ-707 Operation Manual - Page 108

Renum

Page 108 highlights

REM(') p FORMAT: 1. REM remark 2. ' remark Abbreviation: See Also: PURPOSE: Includes comments in a program. REMARKS: It is often useful to include explanatory comments in a program. These can provide titles, names of authors, dates of last modification, usage notes, reminders about algorithms, etc. These comments are included using the REM (or apostrophe (')) statement. The REM (') statement has no effect on program execution and can be included anywhere in the program. Everything following REM (') in that line is treated as a comment. 204 RENUM o FORMAT: RENUM [new line number] [, [old line number] [,increment]] I ENTER I Abbreviation: REN. See Also: DELETE, LIST PURPOSE: Renumbers the lines of a program. REMARKS: Valid only as direct input in the PRO mode. The line numbers are changed from old line numbers to new line numbers with the specified increment. If the new line number is not specified, the lines are renumbered starting with line 10. If the increment is not specified, the lines are renumbered with an increment of 10. RENUM updates referenced line numbers in GOTO, ON ...GOTO, GOSUB, ON...GOSUB, RESTORE, and (IF) ...THEN statements . An error occurs if line numbers are given as a variable (GOTO A) or numerical expression (GOTO 2 [KJ 50) . If an error occurs, renumbering is not carried out. If a line number is given by a variable or expression, temporarily make it a remark (REM), and correct it after executing the RENUM command. It is recommended that you replace such commands with ON...GOTO commands, etc. If a line number exceeds 65279, an error is generated. If a specified old line number does not exist, an error is generated. Changing the execution order generates an error. If a password has been used, an error occurs. If the display shows ''*'', pressing the 0 0 key will interrupt renumbering . A display of '':tc+::" indicates that renumbering cannot be 0 0 interrupted. Error generation or use of the key leaves the program unchanged. 205

  • 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

REM(')
FORMAT:
1.
REM remark
2. ' remark
Abbreviation:
See
Also:
PURPOSE:
Includes comments
in
a program.
REMARKS:
It is often useful to include explanatory comments in a program. These
can provide titles, names of authors, dates of last modification, usage
notes, reminders about algorithms, etc. These comments are included
using the REM (or apostrophe (')) statement.
p
The REM (') statement has no effect on program execution and can be
included anywhere
in
the program. Everything following REM (') in that
line is treated as a comment.
204
RENUM
o
FORMAT:
RENUM [new line number]
[,
[old line number] [,increment]]
I
ENTER
I
Abbreviation:
REN.
See
Also:
DELETE, LIST
PURPOSE:
Renumbers the lines of a program.
REMARKS:
Valid only
as
direct input
in
the PRO mode.
The line numbers are changed from old line numbers to new line
numbers with the specified increment. If the new line number
is
not
specified, the lines are renumbered starting with line 10. If the
increment
is
not specified, the lines are renumbered with an increment
of 10. RENUM updates referenced line numbers
in
GOTO,
ON .
..
GOTO, GOSUB,
ON
... GOSUB, RESTORE, and (IF) ...THEN
statements.
An error occurs
if
line numbers are given
as
a variable (GOTO
A)
or
numerical expression (GOTO 2
[KJ
50). If an error occurs,
renumbering
is
not carried out. If a line number
is
given by a variable
or expression, temporarily make it a remark (REM), and correct
it
after
executing the RENUM command. It
is
recommended that you replace
such commands with
ON
...
GOTO commands, etc.
If a line number exceeds 65279, an error is generated. If a specified
old line number does not exist, an error
is
generated. Changing the
execution order generates
an
error. If a password has been used,
an
error occurs.
If
the display shows
''*
'',
pressing the
00
key will interrupt
renumbering. A display
of
'
':tc+::"
indicates that renumbering cannot
be
interrupted. Error generation or use of the
00
key leaves the program
unchanged.
205