Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

Seek

  • Last UpdatedJul 18, 2023
  • 1 minute read

Sets the current position within a file opened using the Open statement, ready for the next read or write action.

The required FileNum argument must contain an Integer representing any valid system file number associated with an open file.

The required Position argument must contain an Integer or expression representing a valid number.

Note: The file system keeps track of all open files and the current position of access within every file. Every statement or function that accesses the data within a file, alters the current position within that file. The Loc function can be used to determine the current position within an open file.

Syntax

Seek FileNum, Position

FileNum:

An Integer or numeric expression representing any valid number in the range 1 to 511 inclusive, which is referenced by the file system to be associated with an open file.

Position:

An Integer or expression representing a valid numeric value.

EOF | FileLen | Loc | LOF

Example

Open "TESTFILE" For Input As #1 ' Open file for reading.

For i = 1 To 24 Step 3 ' Loop until end of file.

Seek #1, i ' Seek to byte position

MyChar = Input(1, #1) ' Read next character of data.

Print MyChar 'Print character of data

Next i

Close #1 ' Close file.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in