From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA09149; Thu, 8 Jan 2004 16:05:14 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA08985 for ; Thu, 8 Jan 2004 16:05:13 +0100 (MET) Received: from nemerle.org (lilith.ii.uni.wroc.pl [156.17.4.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i08F5C522046 for ; Thu, 8 Jan 2004 16:05:13 +0100 (MET) Received: from malekith by nemerle.org with local (Exim 4.24) id 1Aebif-0000Zm-NB for caml-list@inria.fr; Thu, 08 Jan 2004 16:05:09 +0100 Date: Thu, 8 Jan 2004 16:03:58 +0100 From: Michal Moskal To: caml-list@inria.fr Subject: Re: [Caml-list] Reason why 'for' doesn't work across floats? Message-ID: <20040108150358.GA6893@roke.freak> Mail-Followup-To: caml-list@inria.fr References: <20040108141152.GA19714@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040108141152.GA19714@redhat.com> User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 floats:01 2004:99 floats:01 printf:01 michal:01 moskal:01 malekith:01 kernel:01 int:01 int:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Jan 08, 2004 at 02:11:52PM +0000, Richard Jones wrote: > Is there a particular reason why I shouldn't be allowed to step over > floats? > > # for r = 0. to 9. step 1. do printf "%f" r done;; > -- > This expression has type float but is here used with type int let f a b = for x = a to b do () done What type would f have (int -> int -> int or float -> float -> float)? One would need "for.", which doesn't seem appealing. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h ------------------- 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