Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

fseek (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the support class.

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.

Details

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

This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.

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


Resources


 

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