Sharp OZ-707 Operation Manual - Page 92

Locate

Page 92 highlights

LOC P D FORMAT: LOC file number Abbreviation: See Also: OPEN PURPOSE: Returns the current pointer position (logical) in a file. REMARKS: The LOC command returns the number of records read or written since the file with the specified number was opened. One record is 256 bytes long. If the device name is COM, LOC returns the number of data bytes stored in the 20-character (40-byte) buffer. An error occurs if a file with the specified number has not been opened. EXAMPLE: 10: OPEN "E:FILE01 " FOR INPUT AS #2 20: IF EOF(2) THEN 50 30: INPUT #2,N 40: GOTO 20 50: M=LOC(2) 60: PRINT "THE FILE HAS";M;"RECORDS· 70: CLOSE #2 80: END 172 LOCATE p o FORMAT: 1. LOCATE [expression 1] [,expression 2] 2. LOCATE Abbreviation: LO. See Also: CLS, INPUT, PRINT, PAUSE, GCURSOR, WIDTH PURPOSE: Specifies the display start position in character units. REMARKS: Specifies the display start position in units of a character position for the contents displayed by the PRINT command, PAUSE command, etc. When WIDTH,S has bee.n specified, the display position is specified as follows using format 1: Horizontal position (specified by expression 1) o01234 1415 _ 7 Vertical poSition (specified by expression 2) When WIDTH,4 has been specified, the display position is specified as follows using format 1: o 11 o 2 3 If expression 1 is omitted, the horizontal position 0 is assumed. If expression 2 is omitted, the current cursor vertical position is assumed. 173

  • 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

LOC
FORMAT:
LOC file number
Abbreviation:
See
Also:
OPEN
PURPOSE:
Returns the current pointer position (logical) in a file.
REMARKS:
P
D
The LOC command returns the number of records read or written since
the file with the specified number was opened. One record
is
256 bytes
long. If the device name is COM, LOC returns the number of data
bytes stored
in
the 20-character (40-byte) buffer.
An
error occurs
if
a file with the specified number has not been opened.
EXAMPLE:
10:
OPEN
"E:FILE01
"
FOR
INPUT
AS
#2
20:
IF
EOF(2)
THEN
50
30: INPUT #2,N
40
: GOTO 20
50
: M=LOC(2)
60:
PRINT "THE
FILE
HAS";M;"RECORDS·
70: CLOSE #2
80
: END
172
LOCATE
FORMAT:
1.
LOCATE [expression
1]
[,expression 2]
2.
LOCATE
Abbreviation:
LO.
See
Also:
CLS, INPUT, PRINT, PAUSE, GCURSOR, WIDTH
PURPOSE:
Specifies the display start position
in
character units.
REMARKS:
p
o
Specifies the display start position in units of a character position for
the contents displayed by the PRINT command, PAUSE command, etc.
When WIDTH,S
has
bee.n
specified,
the display position
is
specified
as follows using format 1:
Horizontal position (specified
by
expression 1)
01234
···················
1415
o
7~
______________
~
Vertical poSition (specified
by
expression 2)
When WIDTH,4
has
been
specified,
the display position
is
specified
as follows using format
1:
o
..................
...
.
.............
11
o
2
3~
______________
~
If expression 1 is omitted, the horizontal position 0 is assumed.
If expression 2 is omitted, the current cursor vertical position
is
assumed.
173