comp.lang.ada
 help / color / mirror / Atom feed
* creating a 16 bit value from 2 8 bit values in Ada
@ 2002-08-02  1:40 Mark
  2002-08-02  2:07 ` Darren New
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Mark @ 2002-08-02  1:40 UTC (permalink / raw)


Could someone show me how to concatenate the Hi and Lo components? 
The end result - obviously - would be a 16 bit value.  I've waded
through my ada books here and keep coming up short?


type SOME_TYPE is 
  record 
    Lo   : BYTE;
    Hi   : BYTE;
    X    : BOOLEAN;
  -- more stuff
end record;

for SOME_TYPE use
 record
  Lo at 0 range 0 .. 6;
  Hi at 0 range 7 .. 15;
  -- more stuff
end record;  

In an earlier post i made a reference to 'intrinsics' that might aid
in my objective, but that appears to be a tartan utility.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-08-03 14:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-02  1:40 creating a 16 bit value from 2 8 bit values in Ada Mark
2002-08-02  2:07 ` Darren New
2002-08-02  8:36   ` John McCabe
2002-08-02 18:21 ` Stephen Leake
2002-08-03 14:37   ` Robert Dewar
2002-08-03  0:52 ` Kevin Krieser
2002-08-03  1:59 ` SteveD
2002-08-03  2:02 ` creating a 16 bit value from 2 8 bit values in Ada (again) SteveD

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