> However I do not know how the running program image 
> can get affected on a reload. Any clues there? Or is
> the behavior undefined?

I don't think I understand the question, but I will try to answer anyway.  

First of all, the J executable itself remains unchanged, of course. 
Secondly, reloading a script is no different from loading it the first time. 
Whatever happens when you load the script initially will happen again when
you reload it (modulo your script's sensitivity to things that could have
changed in the interim, such as the file system, or names defined in the
interpreter).

In short, when you reload a script, any side effects of your script occur,
and any names you've changed get redefined.

For example, if you edit a file to change the definition of a verb, then
reload it in J, the next time that verb is invoked, it will use its new
definition.  

But you should also be aware that there are certain restrictions on
redefining a name on the stack (currently executing).  I don't know what
they are, exactly, and I can't seem to get a working example of a
restriction.  This may only be relevant under  13!:0[1  .  But, to be on the
safe side & avoid the problem, you may take the approach adopted by  CTRL+W 
and use  runimmx1_jijs_  'load filename'  .

You should also be aware that if your script wrote to a file, then every
time you reloaded the script, it would write to that file.  

Does that answer your question?  If not, could you try phrasing it
differently?  

-Dan
-- 
View this message in context: 
http://www.nabble.com/Reloading-changed-scripts-tp14378524s24193p14445354.html
Sent from the J Programming mailing list archive at Nabble.com.

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

Reply via email to