trace can be confusing.  It runs in its own locale, and names that you 
think are defined are not defined to trace.  In this case, a is not 
defined to trace, and trace thinks it is a verb.

Define a in z locale, and trace will do what you expect.


    load 'trace'
    erase <'a'
1
    a_z_ =: /
    trace 'a /'
  --------------- 6 Bident -----
  /
  /
  //
  ==============================

    trace 'a a'
  --------------- 6 Bident -----
  /
  /
  //
  ==============================


Henry Rich


Viktor Cerovski wrote:
> 
> Brian Schott wrote:
>> The console session below is meant to suggest a way that execution can
>> be observed. Also, notice that one of the examples is an Adverb
>> execution and the other is a Bident.
>>
>>    load'trace'
>>    erase <'a'
>> 1
>>    a =. /
>>    trace 'a /'
>>  --------------- 3 Adverb -----
>>  a
>>  /
>>  a/
>>  ==============================
>>
>>    trace 'a a'
>>  --------------- 6 Bident -----
>>  a
>>  a
>>  a a
>>  ==============================
>>
> Brian, I know both of these rules. My claim is that the evaluation rules of
> J can 
> be formulated in such a way that both (a /) as well as (a a) are evaluated 
> using the Bident rule without any effect on the results of an arbitrary J
> program,
> and because of that the above demonstration is irrelevant.
> 
> In particular, it doesn't explain why in the previous examples
> (v a) evaluated to v/ while (a a) evaluated to itself rather than //
> 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to