comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: How difficult is ada to learn?
Date: 30 Jun 2005 18:35:06 -0400
Date: 2005-06-30T18:35:06-04:00	[thread overview]
Message-ID: <wccr7ejv5gl.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 42c40952$0$32193$39cecf19@news.twtelecom.net

Matthew Heaney <mheaney@on2.com> 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



  reply	other threads:[~2005-06-30 22:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30  0:44 How difficult is ada to learn? Sm704
2005-06-30  5:11 ` Ludovic Brenta
2005-06-30  6:15   ` Preben Randhol
2005-06-30 14:19 ` Gene
2005-06-30 14:34   ` Matthew Heaney
2005-06-30 15:00     ` Duncan Sands
2005-06-30 18:38     ` Gene
2005-06-30 19:32       ` Matthew Heaney
2005-06-30 18:59     ` Randy Brukardt
2005-06-30 19:36       ` Matthew Heaney
2005-06-30 15:01   ` Matthew Heaney
2005-06-30 22:35     ` Robert A Duff [this message]
2005-07-15  2:27       ` Waldek Hebisch
2005-07-15  5:14         ` Ludovic Brenta
2005-07-01  5:37     ` Jeffrey Carter
2005-06-30 16:43 ` Martin Krischik
2005-06-30 19:36 ` svaa
2005-06-30 22:53 ` chris
2005-06-30 22:54   ` chris
2005-07-01  5:39   ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox