For the actual error report, it's not clear to me whether this was a deliberate
change or not. I was so used to a value error reporting the missing name that
901's behaviour surprised me. This new behaviour *does* bring value error more
in line with the other errors, so I don't have a problem with it -- the extra
spacing in the error report makes the offending name clear.
The stack frame issue is different, and not specific to value error -- thanks
for looking into this.
Something else I noticed in 901:
dbr 1
foo=: 3 : '1 2+1 2 3'
foo ''
|length error: foo
| 1 2 +1 2 3
|foo[0]
13!:12 ''
|length error: foo
| 1 2 +1 2 3
|foo[0]
13!:18 ''
|length error
* foo''
|foo[0]
| foo''
13!:12 ''
|length error
* foo''
|foo[0]
| f
In the above, I hope the result of 13!:18 (and 13!:1) will report the
suspension line:
* 1 2 +1 2 3
But also notice how messed up the second invocation 13!:12 is! Looks like
serious stack frame shift going on there.
While looking at this, how about reporting the line number in the initial error
report (and 13!:12)? This would be particularly useful in the dbr 0 case:
foo ''
|length error: foo[0]
| 1 2 +1 2 3
(Or just ignore that last suggestion -- my impression is that working on
debug/suspension is like trying to defuse a bomb). :)
/K
> On Nov 19, 2019, at 6:29 PM, Henry Rich <[email protected]> wrote:
>
> I'll work on this. Part of the development for 9.01 was the disentangling
> of debug from names and explicit definitions. I never really knew what the
> messages were supposed to be, and thus it didn't jump out at me that they
> were wrong. You are saying that they are off by one stack frame when debug
> is on, which is plausible given the kind of changes I made.
>
> Henry Rich
>
>> On 11/19/2019 7:27 PM, Kirk Iverson wrote:
>> Hi Bill,
>>
>> I'm afraid I don't think we're on the same page. Let me be more clear about
>> what I think is going wrong in my example:
>>
>> 1/ The actual error message in 901 is:
>> |value error: foo
>> In 807, the error message is:
>> |value error: nodef
>> I.e. the 807 report indicates the name which is actually undefined; in
>> 901 the
>> name of the verb getting the error is reported.
>>
>> 2/ In 901 the suspended line (*) being reported is:
>> * foo ''
>> In 807 the suspended line is:
>> * nodef+1
>> I.e. 901 is reporting that the line foo[0] is: foo '' ,but it's really
>> not.
>>
>> /K
>>
>>
>>>> On Nov 19, 2019, at 4:52 PM, bill lam <[email protected]> wrote:
>>>
>>> I can duplicate the bug
>>> 1/ I think it is ok because there should already be extra space before nodef
>>>
>>> 2/ it seems debug had trouble with single line explicit definition . If the
>>> foo had 2 lines, it can show stopped at [0]
>>>
>>>
>>>> On Wed, Nov 20, 2019, 3:48 AM Kirk Iverson <[email protected]> wrote:
>>>>
>>>> Just to make sure the following doesn't fall through the cracks:
>>>>
>>>> dbr 1
>>>> foo=: 3 : 'nodef+1'
>>>> foo ''
>>>> |value error: foo
>>>> | nodef+1
>>>> |foo[0]
>>>> dbs ''
>>>> |dbs[0]
>>>> | dbs''
>>>> * foo''
>>>> |foo[0]
>>>> | foo''
>>>> JVERSION
>>>> Engine: j901/j64avx2/windows
>>>> Beta-q: commercial/2019-11-17T14:09:02
>>>> Library: 9.01.11
>>>> Platform: Win 64
>>>> Installer: J901 install
>>>> InstallPath: c:/users/kbi/j901
>>>> Contact: www.jsoftware.com
>>>>
>>>> There are two problems in the above:
>>>> 1/ The initial error report should read:
>>>> value error: nodef
>>>> 2/ In the dbs report, the suspension line (*) should read:
>>>> * nodef+1
>>>>
>>>> /K
>>>>
>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>>
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm