It's not "buggy" it works as expected. When you add a symbol you need to
fix.
   TD=:'SymbolExist=: 13 : 0',LF,'(0 s: 0)~:(5 s: _6 s: i.0 s:0)i.<y',LF,')'
   0!:0 TD
   SymbolExist 'voila'
0
   s:<'voila'
`voila
   0!:0 TD
   SymbolExist 'voila'
1

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dan Bron
Sent: Friday, September 28, 2007 5:27 PM
To: 'Programming forum'
Subject: RE: [Jprogramming] Symbol exist ?

Paul wrote:
> I found one way of improving the speed, by going from 
> explicit to tacit: 

Paul, your current tacit formulation is buggy:

           SymbolExist 'paul'
        0
           s:<'paul'
        `paul
           SymbolExist 'paul'
        0
           
(for the reasons why, see an earlier message I sent you:
http://www.jsoftware.com/pipermail/general/2007-May/029982.html  )   

I posted a tacit SymbolExists verb earlier today:
http://www.jsoftware.com/pipermail/programming/2007-September/008221.html  .


Since only you have your symbol data, you might want to compare it to your
explicit version.  Of particular note:  it uses  e.
instead of  i.  which is probably faster, for this purpose  (i.e.  e. -:
#@:] ~: i.~  but  e.  is more optimized than the latter
verb).

-Dan

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


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

Reply via email to