comp.lang.ada
 help / color / mirror / Atom feed
From: Warren <ve3wwg@gmail.com>
Subject: Re: Ada Leaking Into Day Job
Date: Mon, 22 Mar 2010 15:18:46 +0000 (UTC)
Date: 2010-03-22T15:18:46+00:00	[thread overview]
Message-ID: <Xns9D437314CC1CEWarrensBlatherings@85.214.113.135> (raw)
In-Reply-To: 80l74nFptU1@mid.individual.net

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

Bj�rn Persson expounded in news:80l74nFptU1@mid.individual.net:

> Adam Beneschan wrote:
> 
>>    if (code /= 0) { ... }
>> 
>> This is valid C, so the compiler won't complain
> 
> Are you sure? ;-)
> 
> int main(int argc, char** argv) {
>    int code = 1;
>    if(code /= 0) {
>       return 1;
>    }
>    return 0;
> }
> 
> [beorn@hactar tester]$ LANG=en gcc ada_not_equal.c 
> ada_not_equal.c: In function 'main':
> ada_not_equal.c:3: warning: division by zero
> 
> That's even without the otherwise indispensable -Wall.
> 
> The problem I have most often when I switch languages is that I get =,
> := and == mixed up.

Yep, I've been having to backspace over some := in my
awk scripts lately also.

Warren



  reply	other threads:[~2010-03-22 15:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19 17:24 Ada Leaking Into Day Job Warren
2010-03-19 21:53 ` Adam Beneschan
2010-03-21  0:21   ` Björn Persson
2010-03-22 15:18     ` Warren [this message]
2010-03-22  9:53 ` Gautier write-only
2010-03-22 16:55 ` KarlNyberg
2010-03-22 17:07   ` Gautier write-only
2010-03-24 21:48     ` Gautier write-only
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox