Interesting, there is something strange happening
between script (0!:0) and explicit (3 : '') contexts.
See *).
0!:0 't=. 1+1' NB. immediate session
t
2
erase nl''
1
NB. strange (not a value error)
3 : 't [ 0!:0 ''t=. 1+1'' ' 0
|domain error: t
| t[0!:0't=. 1+1'
NB. unlike a true value error
3 : 'z [ 0!:0 ''t=. 1+1'' ' 0
|value error: z
| z[0!:0't=. 1+1'
NB. at the same time, it is listed as noun
3 : 'nc<''t'' [ 0!:0 ''t=. 1+1'' ' 0
0
3 : 'nc<''z'' [ 0!:0 ''t=. 1+1'' ' 0
_1
NB. moreover it is blocking =:
3 : 't [ 0!:0 ''t=: 1+1'' [ t=.3 ' 0
|domain error
| t =:1+1
|[-0]
NB. no effect of =. in 0!:0 if defined earlier
3 : 't [ 0!:0 ''t=. 1+1'' [ t=. 3' 0
3
______________
*) I believe, it can be assumed that the following
have the same effect:
0!:0 ] 1!:1 <'test1.ijs'
0!:0 <'test1.ijs'
so we can just use instead:
0!:0 'contents of script file (test1.ijs) here'
For example,
0!:0 'smoutput 1',LF,'smoutput 2'
1
2
--- "N. Drinkwater" <[EMAIL PROTECTED]> wrote:
> I've found that a conflict between local variables in some of the
> library scripts and global variables in application scripts will cause
> an error when the standalone script is started from the command-line. No
> error occurs when using 0!:0 from minijx.
>
> For example, stdlib.ijs contains the following lines:
>
> t=. <;._1 '/invalid name ...
> type=: {&t@(2&+)@(4!:0)&boxopen
>
> (note that the line t=. is truncated above)
>
> The local assignment in stdlib will cause a crash when a stand-alone
> application is built for the following script:
>
> NB. testerr.ijs
> coclass'test'
> t=: 1
> test=: 3 : 0
> wd'mb "J" "hello world"'
> )
> cocurrent'base'
> test''
>
> The local assignment causes a problem even though the global assignment
> is in a different locale. The above will work fine from the J session
> manager or when loaded using 0!:0 in the minimal J window given by
> running j.exe -jprofile from the command line. The crash only happens
> when using
>
> j.exe -jprofile test.ijs
>
> from the command line, where test.ijs is the stand-alone script. Other
> single letter variables that cause the same problem are a, c, d, h, and
> j. It took some time to track this problem down the first time my
> stand-alone application gave the dreaded "Error and no IDE window for
> debugging" dialog. One solution would be to make all of the local
> "helper" assignments in the system scripts global assignments.
>
> Norman Drinkwater
>
>
>
> Chris Burke wrote:
> > Saunders, John (HMSRHS) wrote:
> >> Thanks Chris, I now have the script working from the session manager
> >> loaded without the jprofile by entering 0!:0 <'c:\EMA\salaries.ijs'
> >> However I can't get it working form a desktop shortcut for some reason,
> >> I've tried different syntax with no luck for example
> >> C:\EMA\j.exe -jprofile salaries.ijs
> >> C:\EMA\j.exe -jprofile \salaries.ijs
> >> C:\EMA\j.exe -jprofile c:\EMA\salaries.ijs
> >> I can load c:\EMA\j.exe - jprofile from the desktop; though can't seem
> >> to include the script??
> >
> > This does not sound right. Loading J with:
> >
> > C:\EMA\j.exe -jprofile c:\EMA\salaries.ijs
> >
> > should be essentially the same as loading J with:
> >
> > C:\EMA\j.exe -jprofile
> >
> > and then entering
> >
> > 0!:0 <'c:\EMA\salaries.ijs'
> >
> > Is the Start In directory set correctly in your shortcut? What error
> > message do you get?
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
____________________________________________________________________________________
Shape Yahoo! in your own image. Join our Network Research Panel today!
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm