From: Robert D. <rob...@gm...> - 2015-10-16 16:54:15
|
On 2015-10-16, André Fettouhi <a.f...@gm...> wrote: > /* RGBident=000000 */ > /* Press=1.018119e+00 */ > /* Density=1.000000e+00 */ > /* AutoCalib=0 */ > /* Temp=2.228929e+02 */ > /* Log=1515870810 */ > /* Length=1.000000e+01 */ > /* Name=(null) */ > /* File: absorbed_pre.csv */ Since these are comments, you'll have to parse the content yourself. My advice is to open a stream for reading via 'openr' and read the lines of the header via 'readline', then get all the rest of the data via read_nested_list(S) where S is the stream. To extract the foo=bar stuff, you can call 'substring' and then split the result via 'split'. You can parse numbers via 'parse_string' although I guess you'll need to assign ibase:16 before parsing RGBident. There is a regular expression package in Maxima, although it is not as powerful as the ones in other languages, and it is Lisp-only. But I'll explain how you could use it for this if you're interested. best Robert Dodier |