From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,24d7acf9b853aac8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Mon, 09 Aug 2010 17:34:34 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <547afa6b-731e-475f-a7f2-eaefefb25861@k8g2000prh.googlegroups.com> <984db477-973c-4a66-9bf6-e5348c9b95f2@n19g2000prf.googlegroups.com> <46866b8yq8nn$.151lqiwa0y2k6.dlg@40tude.net> <13b07f2c-2f35-43e0-83c5-1b572c65d323@y11g2000yqm.googlegroups.com> <13tpf7ya3evig$.h05p3x08059s$.dlg@40tude.net> <1omt2srxtpsga$.c3hbxthzo6cf.dlg@40tude.net> <1e4cch2df5uyb.18brqdd16dhv8.dlg@40tude.net> <14y70ke8am9qw$.2csc9eflvigg.dlg@40tude.net> <4c601b5c$0$7665$9b4e6d93@newsspool1.arcor-online.net> <9czktq4ntzq7.fhbsnocx0x4w$.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1281389659 24547 192.74.137.71 (9 Aug 2010 21:34:19 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 9 Aug 2010 21:34:19 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:KLr3Xh26qKulEUjeCURilrw8k3g= Xref: g2news1.google.com comp.lang.ada:13020 Date: 2010-08-09T17:34:34-04:00 List-Id: "Dmitry A. Kazakov" writes: >>> 2. No ranges >>> 3. No loops >> >> I don't know what you want ranges and loops for. > > A subset of flags. E.g. Critical_Errors, Warnings, Any_Error. I don't understand this part. If subrange of a modular type used as a bit map is not a coherent subset of the flags. > Yes, it is a type property that the domain is a set of identifiable values, > in fact, some mapping to an enumeration. > > The language should provide means to implement this interface with any > type. E.g. why I cannot specify this interface for String to be able to > write: > > case Get_Token is > when "type" => ... > when "package" => ... > when others => raise Syntax_Error; > end case; It would be nice. >> But no Ada compilers support this: >> >> type Bit_Map is mod 2**100; > > Why not? It is not that difficult to implement mod 2**100 or range > -2**1_000_000..2**1_000_000+1. I think the standard should require it on > any hardware. I agree. But you and I are in a small minority here! The frustrating thing to me is that every Ada compiler must support arbitrary-range integer arithmetic at compile time, but can't make that available in a portable way at run time. - Bob