Sharp OZ-707 Operation Manual - Page 62

Clear, Close

Page 62 highlights

CLEAR p o FORMAT: CLEAR [variable 1, variable 2, ..., variable n] Abbreviation: Cl. See Also: DIM, ERASE PURPOSE: Erases variables that have been used in the program and resets all preallocated variables to zero or null. REMARKS: CLEAR recovers memory space used to store simple numeric variables, and array variables secured using the DIM statement. Also use CLEAR at the beginning of a program to clear space occupied by variables from previously run programs if several programs are in memory. Do not use the CLEAR command within a FOR. ..NEXT loop. Use the ERASE command to clear specific array variables. EXAMPLE: 10: A = 5: DIM C(5) 20: CLEAR [20] Frees up the spaces assigned to C( ) and resets A to zero. CLOSE p o FORMAT: CLOSE [# file number, # file number, ...] Abbreviation: CLOS. See Also: OPEN PURPOSE: Closes a file or files on the currently accessed device. REMARKS: This command closes files with the specified file numbers. If fl{) file number is specified, all files are closed. The file numbers are then released for use with other files. All files are closed in the following cases: • An END or RUN command is executed. • The power is turned off. • The Card is changed to the STAT or AER mode. • A program is written or read (by the LOAD or MERGE command). EXAMPLE: CLOSE #2, #5 , #21 Closes files #2, #5, and #21 . 112 113

  • 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

CLEAR
FORMAT:
CLEAR [variable
1,
variable
2,
..., variable
n]
Abbreviation:
Cl.
See
Also:
DIM, ERASE
PURPOSE:
Erases variables that have been used
in
the program and resets
all
preallocated variables to zero
or
null.
REMARKS:
CLEAR recovers memory space used to store simple numeric
variables,
and
array variables secured using the
DIM
statement. Also
use CLEAR at the beginning of a program
to
clear space occupied by
variables from previously
run
programs if several programs are
in
memory.
Do not use the CLEAR command within a FOR.
..
NEXT loop.
Use the ERASE command to clear specific array variables.
EXAMPLE:
10
: A
=
5:
DIM
C(5)
20: CLEAR
[20] Frees up the spaces assigned
to
C(
) and resets A to zero.
112
p
o
CLOSE
F
ORMAT:
CLOSE
[#
file number,
#
file number, .
..
]
Abbreviation:
CLOS.
See
Also:
OPEN
P
URPOSE:
Closes a file or files
on
the currently accessed device.
REMARKS:
This command closes files with the specified file numbers. If
fl{)
file
number
is
specified,
all
files are closed. The file numbers are then
released for use with other files.
All files are closed
in
the following cases:
An
END or
RUN
command
is
executed.
• The power
is
turned off.
• The Card
is
changed
to
the STAT or AER mode.
• A program
is
written or read (by the LOAD or MERGE command).
EXAMPLE:
CLOSE #2, #5 ,
#21
Closes files #2, #5,
and
#21
.
113
p
o