The verb "prompt" is quite useful but one should be a little careful if "prompt" is executed before a loaded script completes execution. This is a little wierd but it has some interesting possibilities as well. Consider the following script:

require 'misc'

z=:prompt 'Text following in script is grabbed.'
t=:'This is grabbed instead of being executed.'
w=:'More text'
NB. End of script

Running it gives:

  loadd 'd:\juser\temp\31.ijs'
  require 'misc'
z=:prompt 'Text following in script is grabbed.' Text following in script is grabbed.t=:'This is grabbed instead of being executed.'
  w=:'More text'
  NB. End of script

NB. Following entered after the script completes:
  t
|value error: t
  w
More text

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

Reply via email to