Next: ACCEPT /FORMAT
Up: ACCEPT
Previous: ACCEPT /BINARY
Contents
Index
ACCEPT /COLUMN
[SIC\]ACCEPT Var_1 [Var_2 [...] /COLUMN File_Name [Separator] [/FOR-
MAT String] [/LINE L1 [L2]]
Read ONE or SEVERAL 1-Dimensional variables in a flexible format from a
formatted file File_Name. Each variables can be of any length, from 0
(scalar) to N. They are filled by reading each associated column, start-
ing from first line. Data is read in as many lines as required. If end
of file is reached in the meantime, an error is raised.
Blank or commented lines (starting with a "!") are skipped. The starting
line number can be selected with /LINE option. The user can specify a
format using the /FORMAT option but it is usually not needed.
A * as an argument of the ACCEPT command indicates a dummy variable used
to skip a column in the input file. For example, the command
ACCEPT A * B C /COLUMN TEST.DAT
reads A,B and C from columns 1,3 and 4 of file TEST.DAT, since the * in-
dicates to skip the second column.
By default, the format is the equivalent of the Fortran list-directed
(*) format, i.e. it interpret words separated by spaces. However, a dif-
ferent word separator can be specified is the second argument of option
/COLUMN. For example, specifying "\;" as a separator can allow to read
CSV files (e.g. Excel data files).
Gildas manager
2011-09-07