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 RAA01139; Mon, 2 Apr 2001 17:24:12 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA01254 for ; Mon, 2 Apr 2001 17:24:11 +0200 (MET DST) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f32FOAD15608; Mon, 2 Apr 2001 17:24:10 +0200 (MET DST) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id IAA10909; Mon, 2 Apr 2001 08:24:09 -0700 (PDT) Date: Mon, 2 Apr 2001 08:24:09 -0700 (PDT) From: Brian Rogoff To: Xavier Leroy cc: caml-list@inria.fr Subject: Re: [Caml-list] petty complaints In-Reply-To: <20010402153244.D30450@pauillac.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 2 Apr 2001, Xavier Leroy wrote: > > Another unrelated trifling question concerns the syntax of numerical > > literals. Would it be possible to allow a la Ada the insertion of _s in > > a numerical literal so instead of 1000000,10000000,and 100000000 we could > > write 1_000_000, 10_000_000, 100_000_000? Of course, as in Ada, you could > > allow wrongly positioned or superfluous _s (1_00_00_______0) but I think > > this trivial change can make reading numbers a bit nicer. Arrghhh, the Ada syntax allows arbitrary placement but no additional _s, let this serve as an example to those who don't go right for the formal syntax :-(. Here's the relevant part based_numeral ::= extended_digit {[underline] extended_digit} extended_digit ::= digit | A | B | C | D | E | F I was reminded of this feature of Ada when I was hacking some (OCaml, not Ada!) config files and I had to look carefully at a params to make sure I got the number of zeroes right. -- Brian ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr