Alexander Burger <a...@software-lab.de> writes:

Hi Alex,

> No, in fact this is the intended behavior of how the PicoLisp I/O
> functions expand the "@".
>
> The value is determined from how it was invoked. If you call it with
>
>    $ ../../foo/bar/pil +
>
> then "@" expands to "../../foo/bar/", and if you call it as
>
>    $ /home/tj/git/iorg/picoLisp/pil +
>
> then "@" will be "/home/tj/git/iorg/picoLisp/".
>
> As a special convenicence, "./" is "optimized" to nothing ;-)
>
> All this behavior does not in any way depend what your PWD is at that
> moment. Only how PicoLisp was invoked.

Ok, but then the question remains how to get (in a program) the absolute
path to the PicoLisp installation the programs runs in when you assume a
local installation was invoked - but you have no idea how?

I thought about combining (cmd) and (path ...), but that doesn't help either

,--------------------------------
| [tj@hostname picoLisp]$ ./pil +
| : (cmd)
| -> "./bin/picolisp"
| : (path "@lib/")
| -> "lib/"
`--------------------------------

nor do (dirname ...) or (basename ...). 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to