[Info-vax] C limitations, was: Re: VMS process communication

Arne Vajhøj arne at vajhoej.dk
Mon Mar 27 18:59:07 EDT 2023


On 3/27/2023 6:19 PM, Johnny Billquist wrote:
> On 2023-03-27 15:21, Arne Vajhøj wrote:
>> On 3/27/2023 8:27 AM, Simon Clubley wrote:
>>> = for assignment, versus == for comparison. (At least it's not PHP 
>>> however,
>>> where you need to use === to get a sane comparison. :-))
>>
>> C == is not that great either.
> 
> [...]
> 
> Not sure I understand what your issue with C == was here.
> You got a bunch of warnings for comparing mismatching types, which was 
> to be expected. I failed to see any problems beyond that.

It gave warnings on zero int comparison with string and NULL. I
would prefer an error.

It accepted non-zero int comparison with string and NULL. I would like
an error.

It accepted int comparison with TRUE/FALSE. I would like
an error.

> This has nothing to do with == as such, but with with C type system. 
> This is how the type system is defined to work.

Yes - a lot of it is due to the type system.

Arne






More information about the Info-vax mailing list