[Maxima] Can't read from file
robert.dodier at gmail.com
Sat May 5 12:07:07 CDT 2012
> i worote a simple ronin.txt file as following:
> ended by a semicolon.
> When I read it by:
> s : read_matrix
> (file_search ("C:/ronin.txt"),"semicolon");
> to which the kernel says:
> numericalio: separator flag "semicolon" not recognized; assume
The numericalio code reads parser tokens (numbers, symbols, etc). (I
suppose it should be renamed accordingly ....) It doesn't recognize
whole Maxima expressions; as you have observed, expressions are read as
a series of tokens.
In order to read whole expressions, you can try this. I don't know if
there's a better way to do it.
S : openr ("ronin.txt"); /* S is a file input stream */
while (e : ?mread (S)) # false do print ("INPUT EXPR:", second (e));
Hope this helps,
More information about the Maxima