Blog

In Ada, you declare a new enumeration type by providing a list of literals:
type Position is ( Left, Middle, Right );Ada also lets you use character literals in an enumeration:
type Calc_Op is ( '*', '/', '+', '-' );or even:
type DNACode is ( 'A', 'C', 'G', 'T', Unknown );Once you have an enumeration type, you can use these literals just as you would other literals:

The difficulty of showing that real-time software safely executes within an allotted time budget arises from the variability of code execution time. Some of this variation arises from hardware effects but a great deal arises from different paths through software. We can reduce and even eliminate this variation at the expense of increased code size and average-case performance.