Variable size/Set

From Rosetta Code
Revision as of 03:10, 27 February 2007 by rosettacode>Waldorf (New page: {{task}} Demonstrate how to specify the minimum size of a variable or a data type. ==Ada== Category:Ada type Response is (Yes, No); -- Definition of an enumeration type with two ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Variable size/Set
You are encouraged to solve this task according to the task description, using any language you may know.

Demonstrate how to specify the minimum size of a variable or a data type.

Ada

type Response is (Yes, No); -- Definition of an enumeration type with two values
for Response'Size use 1; -- Setting the size of Response to 1 bit, rather than the default single byte size