Gottfried Helms on Mon, 07 Nov 2022 15:54:49 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Bug in evaluating "if(p==[],...)"


Am 05.11.2022 um 23:55 schrieb Bill Allombert:
> (...)
> Yes this is sometime annoying, you can use ===[] instead, not sure it that helps you:
> 
> ? 0===[]
> %1 = 0
> ? 1===[]
> %2 = 0
> ? []===[]
> %3 = 1
> 
> Cheers,
> Bill

Bill, thanks!

Well I thought it might be a small bug in evaluation of the 'if()'-syntax
in the C-source-code.

After I've found the workaround using 'if(type(p)=="t_VEC",...)' I've
no more problems. But maybe your hint is as well useful in other
places where related annoyances might occur.

Thanks so far for your hint -

kind regards -

Gottfried

(repost; sorry, OP sent only to Bill Alombert)