I have seen the code like this to append a character
to a string if the string doesn't already end in
that character:

y,LF -. {: y

For example, one use of this is breaking file
input into lines:

<;._2 y,LF -. {: y

But the "end pathname with a slash" problem
could be handled the same way:

path =. path, PATHSEP_j_ -. {: path

--- Brian
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to