Readbinary function – Multichannel Systems NeuroExplorer User Manual

Page 158

Advertising
background image

5.5.1.16. ReadBinary Function

ReadBinary Function


Reads a binary value of a specified type from a file.

Syntax


double ReadBinary(fileID, valueType)

Parameters

Parameter

Type

Description

fileID

double

File ID received from OpenFile function.

valueType

string

Binary type. Should be "char", "uchar", "short",
"ushort", "int", "uint", "int64", "uint64", "float" or
"double".

Returns


The value read from the file.

Comments


None

Usage

NexScript

% open binary file in read mode

file = OpenFile("C:\binaryfile.dat", "r")

% read short (2-byte signed) value

shortValue = ReadBinary(file, "short")

See Also

Introduction to NexScript Programming

NexScript Function Categories

Page 156

Advertising