Sharp OZ-707 Operation Manual - Page 74

FORMAT, Abbreviation, PURPOSE, REMARKS

Page 74 highlights

The loop variable may be used within the group of statements, for example as an index to an array, but care should be taken in changing the value of the loop variable. Write programs so that the program flow does not jump out of a FOR...NEXT loop before the counter reaches the final value. To exit a loop before it has been repeated the specified number of times, set the loop variable higher than the final value. The group of statements enclosed by a FOR...NEXT pair can include another pair of FOR. ..NEXT statements that use a different loop variable as long as the enclosed pair is completely enclosed; i.e., if a FOR statement is included in the group, the matching NEXT must also be included. FOR... NEXT pairs may be "nested" up to six levels deep. Illegally jumping out of an inner loop will generate an error, a nesting error. See Appendix E. An error results if a double-precision variable is specified as the numeric variable. Double-precision initial values, final values, and increments are treated as single-precision values. Do not use the CLEAR, DIM, or ERASE command within a FOR. ..NEXT loop. FRE p o FORMAT: 1. FRE 0 2. FRE 1 Abbreviation: FR. See Also: PURPOSE: Returns the free space available in the program and data area in bytes. REMARKS: FRE returns the byte count of the free space (not occupied by program, array variables, or simple variables) in the program and data area of memory. To speed up execution, a certain fixed number o~ bytes are rese:,ed for each string variable even though a shorter string may be assigned to the variable. Thus, the size of the free space is not affected by the lengths of strings assigned to string variables. It is, however, possible to eliminate idle space in each variable to increase free space. Format 1 returns the free space by eliminating idle space in each string 2 variable so its execution may take a little more time. Format returns the free space without eliminating idle space in string variables. It is useful for determining the approximate amount of free space. The value of free space returned by format 1 may not match that returned by format 2. 136 137

  • 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

The loop variable may
be
used within the group of statements, for
example as
an
index to an array, but care should be taken in changing
the value of the loop variable.
Write programs
so
that the program flow does not jump out of a
FOR.
..
NEXT loop before the counter reaches the final value. To exit a
loop before it has been repeated the specified number of times, set the
loop variable higher than the final value.
The group of statements enclosed by a FOR.
..
NEXT pair can include
another pair of FOR.
..
NEXT
statements that use a different loop
variable as long as the enclosed pair is completely enclosed; i.e., if a
FOR statement
is
included in the group, the matching NEXT must also
be included. FOR.
..
NEXT pairs may be "nested" up to six levels deep.
Illegally jumping out of an inner loop will generate
an
error, a nesting
error. See Appendix
E.
An error results if a double-precision variable is specified as the
numeric variable. Double-precision initial values, final values, and
increments are treated as single-precision values.
Do not use the CLEAR, DIM,
or
ERASE command within a
FOR.
..
NEXT loop.
136
FRE
FORMAT:
1.
FRE 0
2. FRE 1
Abbreviation:
FR.
See
Also:
PURPOSE:
p
o
Returns the free space available in the program and data area
in
bytes.
REMARKS:
FRE returns the byte count of the free space (not occupied by
program, array variables, or simple variables)
in
the program and data
area of memory.
To speed
up
execution, a certain fixed number
o~
bytes are rese:,ed
for each string variable even though a shorter string may be assigned
to the variable. Thus, the size of the free space is not affected by the
lengths of strings assigned to string variables. It is, however, possible
to eliminate idle space
in
each variable to increase free space.
Format 1 returns the free space
by
eliminating idle space
in
each string
variable so its execution may take a little more time.
Format
2
returns the free space without eliminating idle space in string
variables. It is useful for determining the approximate amount of free
space.
The value of free space returned
by
format 1 may not match that
returned by format
2.
137