Different expressions use up differing levels of the C stack:

   $:@:>: :: ] 0
6666
   $:@:(1&+) :: ] 0
4999
   $:@:>:@<:@>: :: ] 0
3999



----- Original Message -----
From: Dan Bron <[email protected]>
Date: Wednesday, January 26, 2011 13:43
Subject: Re: [Jprogramming] identifying the calling function
To: 'Programming forum' <[email protected]>

> Thomas Costigliola asked:
> > What do you make of this:
> >
> >    $:@:>: :: ] 0
> > 6666
> >    foo=. 3 : 'foo :: ] >:y'
> >    foo 0
> > 9999
> 
> Interesting observation!  I'm not sure what to make of 
> it.  
> 
> Maybe J manages the explicit stack manually?  That makes 
> sense for a number
> of reasons (e.g. 13!:13).  If so, then the two stacks which 
> are managed
> independently might have independent limits.  But then, 
> what's with this
> factor of 3333?
> 
> Maybe Roger or Henry have insight.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to