[TUHS] Software written in B
Lars Brinkhoff
lars at nocrew.org
Mon Jun 19 20:48:27 AEST 2023
Sebastien F4GRX wrote:
>> my own compiler choked on if.b and mail.b because of this invalid
>> expression in nxtarg:
>>
>> if(ap>ac) return(0*ap++);
>
> The return value is still a typo, but this expression should not pose
> a problem, the AST shows that the postinc has priority, uses a legit
> lvalue, which result is multiplied by zero.
>
> This was probably not intended but syntactically correct.
I could well believe it's not a typo, but a "clever" way to write
if(ap>ac) {
ap++;
return 0;
}
More information about the TUHS
mailing list