I get a 16 bit integer from C. This integer consists of 16 flags.
How do I change this integer in the record of 16 booleans?
Thank you!
type flag is the record flag 1: boolean; Flag 2: Boolean; - ... Flag 15: boolean; End record; Usage of flag 1 for flag 0 on 0. 0; Category 1 on Flag2. 1; - ... Category 15 in the 15th 15 .. 15; End record; Use the flag size 16; - This is important because, in general, the records are passed in the ADA. - However, as we use it with C, it has to pass by value. - C_Pass_By_Copy was introduced in GNAT and since ADA 2005 it is part of language. Prague Convention (C_Pass_By_Copy, Flags);
You can use this type of cc integer type of imported C function directly in the declaration of instad.
Comments
Post a Comment