This script is an exemple of Oleg's discourse.

Verb "myfunc" is dynamically redefined.

NB.====== script 25.ijs ================

myfunc=: +

 smoutput 3 myfunc 5
 smoutput myfunc 6j4

myfunc=: -      
NB. same from a loaded script (0!:0<'myscript.ijs' )

 smoutput 3 myfunc 5
 smoutput myfunc 6j4

NB.====== script 25.ijs ================

When executed:

   load 'c:\j601\temp\25.ijs'
8
6j_4
_2
_6j_4


~ Gilles


---------- Original Message -----------
From: Oleg Kobchenko <[EMAIL PROTECTED]>
To: Programming forum <[email protected]>
Sent: Fri, 13 Oct 2006 20:27:05 -0700 (PDT)
Subject: Re: [Jprogramming] "Hotswap" of script

> In J system there is no clear separation of
> a running program vs non-running. There are definitions
> in memory, and they run when called. So a program
> is a loose collection of definitions in memory.
> 
> ...
------- End of Original Message -------

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

Reply via email to