Re: [Jgeneral] require not recognising prior usage

2015-08-11 Thread Ian Shannon
Thanks Chris,

That works.

However, jcwdpath defined in

 J803\system\main\stdlib.ijs

has a different definition.  I would be good for either both to be the same, or 
even better for one to point to the other.

Regards,

Ian


-Original Message-
From: general-boun...@forums.jsoftware.com 
[mailto:general-boun...@forums.jsoftware.com] On Behalf Of chris burke
Sent: Tuesday, 11 August 2015 2:50 AM
To: General forum
Subject: Re: [Jgeneral] require not recognising prior usage

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.


--
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


Re: [Jgeneral] require not recognising prior usage

2015-08-10 Thread chris burke
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