ascii_template advanced [message #50018] |
Thu, 07 September 2006 03:00 |
maye
Messages: 29 Registered: June 2006
|
Junior Member |
|
|
Hi!
No, I will not ask how to use a template at a later stage.. ;)
I wondered if this is possible:
My data looks like this:
# Comment lines of varying
# amount, but all starting
# with a # symbol
#
# another one. :)
# and after the comments
# just before the data a header line:
Time;Voltage;Currents;Temperatures
12:00:00;23.1;0.5;270.2
.
.
.
The problem I have with the ascii_template/read_ascii combination is
really the unknown amount of comment lines at the beginning plus the
fact that I want to read the header line in AFTER those unknown amount
of lines.
Because the template let's me ignore the comment lines, but then the
first line of my data structure will contain the variable names.
Also, when I use the DATA_START keyword of read_ascii, it counts again
from the beginning of the file, not from where I already defined the
data to be of value (meaning withOUT the comment lines).
If it would work like that, I could define the template to ignore
comment lines, and then skip one extra line at the read_ascii command,
using it for the HEADER keyword to read in the variable names. Would it
not make more sense if things work like that?
I hope I made myself clear? :-/ By the way, if somebody wonders: I want
the variables names for a GUI to be clickable. ;)
Does anybody have a solution for this?
Many thanks,
Michael Aye
|
|
|