path



On Sun, Oct 28, 2012 at 3:06 AM, Adam <adammaj1 at o2.pl> wrote:

> Hi,
>
> I have file : test.mac containing :
>
> print("The value of load_pathname is: ", load_pathname)$
> print("End of batchfile")$
>
> When I open it with batch command :
>
>
> (%i16) batch("/home/a/maxima/**parabolic/multiplot/test.mac")**$
>
> read and interpret file: #p/home/a/maxima/parabolic/**multiplot/test.mac
>
> (%i17) print("The value of load_pathname is: ",load_pathname)
> "The value of load_pathname is: "false
>
> (%i18) print("End of batchfile")
> "End of batchfile"
>
>
> It the load_pathname is empty, but after batchload not :
>
>
> (%i19) batchload("/home/a/maxima/**parabolic/multiplot/test.mac")**$
>
> "The value of load_pathname is: ""/home/a/maxima/parabolic/**
> multiplot/test.mac"
> "End of batchfile"
>
> Why ?
>
> Is it possible to read and use path inside batch file ?
>

It seems load_pathname is working as documented:

      When a file is loaded with the functions `load',  `loadfile'  or
>      `batchload'  the system variable `load_pathname' is bound to the
>      pathname of the file which is processed.
>

Whether that's the desired behavior is a different question.

What do you want do do with load_pathname in a batch file?

Ray