From: "Cláudio Valente" <cvalente@co.sapo.pt>
To: "Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl>
Cc: skaller@users.sourceforge.net, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: OCAML Downcasting?
Date: Wed, 22 Sep 2004 13:50:36 +0100 [thread overview]
Message-ID: <200409221350.36436.cvalente@co.sapo.pt> (raw)
In-Reply-To: <87d60eizlh.fsf@qrnik.zagroda>
Em Quarta, 22 de Setembro de 2004 07:31, o Marcin 'Qrczak' Kowalczyk escreveu:
> And guess what? No language I know checks division by 0 statically
> (except proof checkers, but they are not suitable for writing big
> programs - too much work)
12>0 cvalente@link Stats 54$ cat t.pl
sub t{
print 1/0;
}
13>0 cvalente@link Stats 54$ perl -c t.pl
Illegal division by zero at t.pl line 2.
perl -c stands for check syntax
gcc also has this. It gives a warning
gcc -c t.c
t.c: In function `t':
t.c:2: warning: division by zero
and it does even more:
24>0 cvalente@link Stats 54$ cat t.cpp
const int X = 1-1;
int t(int i){
return i/X;
}
25>0 cvalente@link Stats 54$ g++ -c t.cpp
t.cpp: In function `int t(int)':
t.cpp:3: warning: division by zero in `i / 0'
These are not exhaustive tests, but they are good enough to catch many common
errors.
--
Cláudio Valente
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2004-09-22 12:50 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ci7tcf$qqf$1@wolfberry.srv.cs.cmu.edu>
[not found] ` <ci9ggm$i6p$1@wolfberry.srv.cs.cmu.edu>
2004-09-21 8:03 ` Jacques GARRIGUE
2004-09-21 8:43 ` Damien Pous
2004-09-21 9:15 ` Jacques GARRIGUE
2004-09-21 9:29 ` skaller
2004-09-21 9:49 ` Jacques GARRIGUE
2004-09-21 9:34 ` Stefano Zacchiroli
2004-09-21 9:56 ` Jacques GARRIGUE
2004-09-21 19:27 ` Michael Vanier
2004-09-21 21:38 ` Brian Hurt
2004-09-21 22:06 ` Michael Vanier
2004-09-21 22:32 ` Brian Hurt
2004-09-22 1:04 ` skaller
2004-09-21 22:20 ` Marcin 'Qrczak' Kowalczyk
2004-09-22 2:26 ` skaller
2004-09-22 6:31 ` Marcin 'Qrczak' Kowalczyk
2004-09-22 9:03 ` sejourne_kevin
2004-09-22 10:29 ` Richard Jones
2004-09-22 18:39 ` Brian Hurt
2004-09-22 10:50 ` skaller
2004-09-22 12:03 ` Alain Frisch
2004-09-22 12:50 ` Cláudio Valente [this message]
2004-09-22 13:15 ` Marcin 'Qrczak' Kowalczyk
2004-09-22 15:50 ` skaller
2004-09-22 18:42 ` Brian Hurt
2004-09-22 18:44 ` Marcin 'Qrczak' Kowalczyk
2004-09-22 19:18 ` Brian Hurt
2004-09-22 0:50 ` skaller
2004-09-22 1:30 ` Jacques GARRIGUE
2004-09-22 2:59 ` skaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200409221350.36436.cvalente@co.sapo.pt \
--to=cvalente@co.sapo.pt \
--cc=caml-list@inria.fr \
--cc=qrczak@knm.org.pl \
--cc=skaller@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox