comp.lang.ada
 help / color / mirror / Atom feed
From: visicom!amstel!rlk@nosc.mil  (Bob Kitzberger)
Subject: Re: Declaring Arrays of Bits (how)?
Date: 29 Sep 92 18:33:24 GMT	[thread overview]
Message-ID: <rlk.717791604@amstel> (raw)

>I am trying to declare arrays of bits in Ada.  Here's my attempt:
>
>type Array_Range_Type is range 1..128;
>
>type Bit_Type is (OFF, ON);
>for  Bit_Type use (OFF => 0, ON => 1);
>for  Bit_Type'size use 1;
>
>type Bit_Array_Type is array (Array_Range_Type) of Bit_Type;

Try slapping a rep spec on the array type:

   for Bit_Array_Type'size use 128;


	.Bob.
----------------
Bob Kitzberger          VisiCom Laboratories, Inc.
rlk@visicom.com         10052 Mesa Ridge Court, San Diego CA 92121 USA
                        +1 619 457 2111    FAX +1 619 457 0888

             reply	other threads:[~1992-09-29 18:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-09-29 18:33 Bob Kitzberger [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-09-29 17:07 Declaring Arrays of Bits (how)? Mark A Biggar
1992-09-29 16:54 jvnc.net!darwin.sura.net!jhunix.hcf.jhu.edu!aplcen.apl.jhu.edu!ddsdx2.jhu
1992-09-29 16:11 agate!spool.mu.edu!sdd.hp.com!cs.utexas.edu!sun-barr!west.West.Sun.COM!cr
replies disabled

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