You may be able to read integers separated by new lines or by spaces by
using lisp.
Try foo:?open(filename);
?read(foo); ?read(foo); ....
Getting the filename in the right form, as a string, may be tricky.
RJF
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Fabrizio Caruso
> Sent: Thursday, September 20, 2007 4:04 AM
> To: maxima at math.utexas.edu
> Subject: reading integers from a stream
>
> Hi
>
> I still have a little problem related to streams.
> I am reading a sequence of integers from a stream.
> I do this through "readline(...)" which
> seems to only read strings.
> Therefore I have to convert such strings into intgers
> which I do with eval_string or parse_string.
> Both eval and parse slow down my program a lot.
>
> Is there a faster way to read a sequence of integers
> from a stream?
>
> Fabrizio
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>