Readline function – Multichannel Systems NeuroExplorer User Manual

Page 147

Advertising
background image

5.5.1.5. ReadLine Function

ReadLine Function


Reads a line from the text file.

Syntax


double ReadLine(fileID, string lineString)

Parameters

Parameter

Type

Description

fileID

double

File ID received from OpenFile function.

lineString

string

String that receives the text from the file.

Returns


Returns 1 if more text to read is available in the file, otherwise, returns 0.

Comments


None

Usage

NexScript

% open a file in read mode

file = OpenFile("C:\parameters.txt", "r")

% read all the lines in the file and print them

if file > 0

line = " " % make line a string variable

while ReadLine(file, line) > 0

Trace(line)

end

CloseFile(file)

end

See Also

Introduction to NexScript Programming

NexScript Function Categories

Page 145

Advertising