When my script file loads other files that I write, it would be very
convenient if we had a special jpath syntax for the folder that contains
the current file. For example, let's say my script is at /my/path/foo.ijs,
and it loads bar.ijs from the same folder.

load 'bar.ijs'
...

Or it loads baz.ijs from a subfolder.

load 'libs/baz.ijs'
...

But this works only when I run the script from the /my/path folder. If I
run it from, say, my home directory, load would fail to locate bar.ijs.

If J provides a special path syntax, say, '~filefolder', I'll be able to do

load '~filefolder/bar.ijs'
...

or

load '~filefolder/libs/baz.ijs'
...

I'll be able to use ARGV_z_ to extract it but that would work only for the
main script file.

Does this make sense? Or am I missing something obvious?

Cheers,
Jinwoo
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to