Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

fseek (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: support

Requires: MathScript RT Module

Syntax

y = fseek(fid, x, from)

Description

Moves the position of the current file mark to the position you specify in x according to the mode you specify in from.

Examples

Inputs

Name Description
fid Specifies the identifier for the file you want to read. Use the fopen function to obtain the file identifier. fid is an integer.
x Specifies how far in bytes from the location you specify in from to set the file mark.
from Specifies where to set the file mark together with x. from is a string that accepts the following values.

'bof' Beginning of the file
'cof' Current file mark
'eof' End of the file

Outputs

Name Description
y Returns the status of this function. If fseek is successful, this function returns 0. Otherwise, this function returns -1.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

t = 0:0.1:pi;
x = sin(t);
fid = fopen('datafile.dat', 'w+');
c = fprintf(fid, '%f\n', x);
y = fseek(fid, 0, 'bof')
fclose(fid);

Related Topics

fclose
feof
fopen
fprintf
fread
frewind
fscanf
fwrite


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit