comp.lang.ada
 help / color / mirror / Atom feed
From: "DuckE" <nospam_steved@pacifier.com>
Subject: Re: Array of bytes type
Date: 2000/05/19
Date: 2000-05-19T00:00:00+00:00	[thread overview]
Message-ID: <3925efc7.0@news.pacifier.com> (raw)
In-Reply-To: 3924E094.6B03B5BD@concentric.net

Here is the answer we use:
PACKAGE BDTbaseDataTypes IS

  TYPE anInt32BDT IS RANGE - (2 ** 31) .. (2 ** 31) - 1;

  FOR anInt32BDT'SIZE USE 32;

  TYPE anInt32ArrayBDT IS ARRAY( Natural RANGE <> ) OF anInt32BDT;

  PRAGMA PACK (anInt32ArrayBDT);

  TYPE anInt16BDT IS RANGE -32768 .. +32767;

  FOR anInt16BDT'SIZE USE 16;

  TYPE anInt16ArrayBDT IS ARRAY( Natural RANGE <> ) OF anInt16BDT;

  PRAGMA PACK (anInt16ArrayBDT);

  TYPE anInt8BDT IS RANGE -128 .. +127;

  FOR anInt8BDT'SIZE USE 8;

  TYPE anInt8ArrayBDT IS ARRAY( Natural RANGE <> ) OF anInt8BDT;

  PRAGMA PACK (anInt8ArrayBDT);

  TYPE aUInt32BDT IS MOD 2**32;

  FOR aUInt32BDT'SIZE USE 32;

  TYPE aUInt32ArrayBDT IS ARRAY( Natural RANGE <> ) OF aUInt32BDT;

  PRAGMA PACK (aUInt32ArrayBDT);

  TYPE aUInt16BDT IS MOD 2**16;

  FOR aUInt16BDT'SIZE USE 16;

  TYPE aUInt16ArrayBDT IS ARRAY( Natural RANGE <> ) OF aUInt16BDT;

  PRAGMA PACK (aUInt16ArrayBDT);

  TYPE aUInt8BDT IS MOD 2**8;

  FOR aUInt8BDT'SIZE USE 8;

  TYPE aUInt8ArrayBDT IS ARRAY( Natural RANGE <> ) OF aUInt8BDT;

  PRAGMA PACK (aUInt8ArrayBDT);

  SUBTYPE aFloatBDT IS FLOAT;

  TYPE aFloatArrayBDT IS ARRAY( Natural RANGE <> ) OF aFloatBDT;

  PRAGMA PACK (aFloatArrayBDT);

  SUBTYPE aDoubleBDT IS LONG_FLOAT;

  TYPE aDoubleArrayBDT IS ARRAY( Natural RANGE <> ) OF aDoubleBDT;

  PRAGMA PACK (aDoubleArrayBDT);

END BDTbaseDataTypes;

For what it's worth,

SteveD







      parent reply	other threads:[~2000-05-19  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-19  0:00 Array of bytes type Joseph P Vlietstra
2000-05-19  0:00 ` Ken Garlington
2000-05-21  0:00   ` Robert Dewar
     [not found]     ` <8gae49$tr5$1@slb7.atl.mindspring.net>
2000-05-22  0:00       ` Marin D. Condic
2000-05-22  0:00         ` Ken Garlington
2000-05-22  0:00           ` Marin D. Condic
2000-05-22  0:00           ` David Kristola
2000-05-23  0:00             ` Paul Warren
2000-05-22  0:00         ` Jean-Pierre Rosen
2000-05-19  0:00 ` Jeff Carter
2000-05-20  0:00   ` Ken Garlington
2000-05-19  0:00 ` James S. Rogers
2000-05-19  0:00 ` Marin D. Condic
2000-05-19  0:00 ` DuckE [this message]
replies disabled

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