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,aa8786249f0c751f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: How difficult is ada to learn? Date: 30 Jun 2005 18:35:06 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1120092264.749327.16210@z14g2000cwz.googlegroups.com> <1120141150.107320.139080@f14g2000cwb.googlegroups.com> <42c40952$0$32193$39cecf19@news.twtelecom.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1120170906 16546 192.74.137.71 (30 Jun 2005 22:35:06 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 30 Jun 2005 22:35:06 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:11788 Date: 2005-06-30T18:35:06-04:00 List-Id: Matthew Heaney writes: > Gene wrote: > > Most people who start with Borland Pascal miss the built-in set and > > string data types. Ada gets the same effects with packages, but the > > syntax is far less elegant and readable. > > Thinking about it some more, I forgot that Ada does built-in support for > sets a la Pascal, in the form of arrays whose component subtype is > Boolean. There are predefined operations for and'ing, or'ing, etc. Right. And you normally want to use pragma Pack on that array. Ada's array-of-boolean doesn't have the annoying restriction of Pascal sets to a small range. If you want 10_000 bits, that's fine in Ada, but Pascal compilers typically won't allow it. The Pascal syntax for sets is nicer than Ada's, though. - Bob