9.0
197
Loc Function
Syntax
Loc(StreamNum)
Group
File
Description
Return StreamNum file position. For Random mode files this is the current record number minus one. For Binary
mode files it is the current byte position minus one. Otherwise, it is the current byte position minus one divided by
128. The first position in the file is 0.
Parameter Description
StreamNum Streams 1 through 255 are private to each macro. Streams 256 through 511 are
shared by all macros.
Example
Sub Main
Open
"XXX" For Input As #1
L = Loc(1)
Close #1
Debug
.Print L ' 0
End
Sub
Lock Instruction
Syntax
Lock StreamNum
-or-
Lock StreamNum
, RecordNum
-or-
Lock StreamNum
, [start] To end
Group
File
Description
Form 1: Lock all of StreamNum.
Form 2: Lock a record (or byte) of StreamNum
.
Form 3: Lock a range of records (or bytes) of StreamNum
. If start is omitted then lock starting at the first record
(or byte).
Note: Be sure to Unlock
for each Lock instruction.
Note: For sequential files (Input, Output and Append) lock always affects the entire file.
Parameter Description










