reading data from a file



On 11/16/06, Fabrizio Caruso <caruso at dm.unipi.it> wrote:

> f : ?open("/home/caruso/Work/code/maxima/test.out")$
> Maxima encountered a Lisp error:
>
>  Error during processing of --eval option "(cl-user::run)":
>
>   The value |&/home/caruso/Work/code/maxima/test.out|
>   is not of type
>     (OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING PATHNAME STREAM).

The problem here is that Maxima strings are not Lisp strings.
(Something I hope we can change in the not-too-distant future.)
I think either

:lisp (setq $f (open "/home/caruso/Work/code/maxima/test.out"))

or (in Maxima) f : ?open(sconcat("/home/caruso/Work/code/maxima/test.out"))
should work. sconcat converts a Maxima string to a Lisp string.
Sorry that this is obscure.

read_matrix, etc, convert the Maxima string before attempting to open the file.

best
Robert