Thanks. I will rearrange jcwdpath so that jpathsep is called at the end, i.e.
jcwdpath_j_=: jpathsep@(1!:43@(0&$),])@((*@# # '/'"_),]) Let me know if this still doesn't work. On 9 August 2015 at 18:38, Ian Shannon <ian.shan...@environment.nsw.gov.au> wrote: > Hi there, > > I tried posting this a few weeks ago, but I now find it apparently wasn't > received. Apologies if this post repeats. > > > The following problem in verb "require" occurs under the following > circumstances - > > * noun right argument of script file is given without a path > implying it is in the current working directory > > * running under windows > > The verb require_j_ checks if the full script name (getscripts_j_ ) is > in the maintained list of loaded scripts ( Loaded_j_ ). > > If and only if the check comes back FALSE the script is loaded. > > However because of the DOS and windows convention of using the back slash > '\' as a path separator this comes unstuck. > > To add in current working directory path of a script name without a path, > getscripts_j_ uses fullname_j_ which in turn uses jcwdpath_j_ which in > turn uses 1!:43 > > Now under windows 1!:43 returns back slashes (well it does for me) in the > working directory path. > > Further as Loaded_j_ list uses the forward slash '/' as path separator > there will be no match. > > Hence script is loaded again when it should not be loaded. > > The fix is going to be trivial, though adding a small overhead for > everyone because of another inanity of windows. > > Ian > > > Ian Shannon > Science Strategy Branch, Science Division > Office of Environment & Heritage > > > > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- > This email is intended for the addressee(s) named and may contain > confidential and/or privileged information. > If you are not the intended recipient, please notify the sender and then > delete it immediately. > Any views expressed in this email are those of the individual sender > except where the sender expressly and with authority states them to be the > views of the NSW Office of Environment and Heritage. > > PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING THIS EMAIL > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm