Good troubleshooting! I see now. Probably fixable, I'll have to think
about details.
In J8.05, a starting symbol table is created when an explicit definition
is created. This table includes y and all other names that are assigned
within the definition. When the definition is executed, the value of
y[/x] is set with the argument; this assignment just stores the value
rather than going through the full assignment code. But that assignment
code is where the 4!:4 value gets set. So you get 0 for the 4!:4 value.
I think the fix will be to set the 4!:4 value in the assignment of y
when the verb starts.
This is yet one more bug to be credited to the quest for performance.
But it really IS important to keep the startup of an explicit definition
as short as possible.
Henry Rich
On 11/24/2016 8:55 PM, Ric Sherlock wrote:
No it appears that (4!:4 <''y'') returns 0 inside loc_z_, which is why the
result is the path to profile.ijs as that seems to be the first element in
the result of 4!:3 ''
Cheers,
On Fri, Nov 25, 2016 at 2:22 PM, bill lam <[email protected]> wrote:
I think (4!:4 <''y'') returns _1 inside loc_z_. Can you verify
this?
Пт, 25 ноя 2016, Ric Tikkanz написал(а):
In J804 (and earlier) running the following verb would give the pathname
of
the script that called it.
loc_z_=: 3 : 'jpath > (4!:4 <''y'') { 4!:3 $0' NB. pathname of script
calling it
So a script that ran: MyPath=: loc ''
would assign the script's pathname to the noun MyPath.
In J805 this no longer appears to work as before. Instead the path
returned
is /opt/j64_805/bin/profile.ijs
Is this change of behaviour expected/intended?
Cheers,
Engine: j805/j64/linux
Beta-16: commercial/2016-11-17T13:15:53
Library: 8.05.09
Qt IDE: 1.5.2s/5.5.1
Platform: Linux 64
Installer: J805 install
InstallPath: /opt/j64_805
Contact: www.jsoftware.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm