file_skip_words
Synopsis
file_skip_words (file, offset, nwords)
Description
The file_skip_words object returns the offset in bytes of a location after skipping nwords in an ASCII file . The words must be separated by spaces.
Parameters
Object of type FILE.file that identifies the file that will be accessed. Note that this is not a string holding the filename. See the example.
Example
To read the third integer on line 10 in the ASCII file, data :
file data_file {
name = "data";
};
/* skips 9 lines */
int line_offset=> file_skip_lines (data_file, 0, 9);
int offset => file_skip_words(data_file, line_offset, 2);
int value => file_scalar_ascii(file_file , offset, 3)Additional Examples
v/dv_examp/file_ucd.v
v/dv_examp/file_unif.vFile
See also related modules