file_scalar_ascii
Synopsis
file_scalar_ascii (file, offset, type)
Description
The file_scalar_ascii object reads ASCII scalar data from file starting at the position specified
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
ASCII file, data.dat, contains an integer and a float:
To get the integer and float values:
file data_file {
name = "data.dat";
};
int i_value => file_scalar_ascii(data_file, 0, 3);
int f_offset => file_skip_words(data_file, 0, 1);
float f_value => file_scalar_ascii(data_file, f_offset, 4);Additional Examples
v/dv_examp/file_ucd.v
v/dv_examp/file_unif.vFile
See also related modules