โŒ About FreshRSS

Normal view

There are new articles available, click to refresh the page.
Before yesterdayNewest questions tagged ada - Stack Overflow

Does Ada have a type equivalent to Pascal's set?

I'm learning Ada as a spare-time activity and, while I realise that it is greatly inspired by Pascal, I can't find a type that is similar to Pascal's set.

set is built into the Pascal language itself and uses one bit per element. So, for example, var a: set of char; declares a (typically) 256-bit data type that can hold any set of characters.

In Ada, I can see that it has sets as part of its library (not a built-in language feature) but those are more like Java's HashSet or C++'s unordered_set and take up much more memory than 1 bit per element. Am I missing something?

โŒ
โŒ