comp.lang.ada
 help / color / mirror / Atom feed
From: maggiejohn@aol.com (MaggieJohn)
Subject: Re: Byte-level to Bit-level Boolean Encoding
Date: 2000/03/31
Date: 2000-03-31T00:00:00+00:00	[thread overview]
Message-ID: <20000330212836.00305.00000103@ng-fh1.aol.com> (raw)
In-Reply-To: 8F07A24FDandrewloguecdcgycom@142.77.1.194

The record type will work for the valid roles variable.   You could also use a
packed array:

type valid_roles is array (1..32) of boolean;
pragma pack valid_roles;
for valid_roles'size use 32;
-- check the syntax here, I'm doing this from memory

Either way, I've always seen unchecked conversion used to change types for
input or output:

with unchecked_conversion;
function to_int32 is new unchecked_conversion(
  source => valid_roles, target => integer32);
-- source and target must be the same size!

- Maggie




  reply	other threads:[~2000-03-31  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-31  0:00 Byte-level to Bit-level Boolean Encoding Andrew Logue
2000-03-31  0:00 ` MaggieJohn [this message]
2000-04-01  0:00   ` Robert Dewar
2000-04-01  0:00   ` Robert Dewar
2000-04-01  0:00     ` A. Logue
replies disabled

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