Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!rochester!ritcv!cci632!rrw From: rrw@cci632.UUCP Newsgroups: comp.lang.ada Subject: problem with using bitfields Message-ID: <951@cci632.UUCP> Date: Sun, 15-Feb-87 13:16:18 EST Article-I.D.: cci632.951 Posted: Sun Feb 15 13:16:18 1987 Date-Received: Mon, 16-Feb-87 01:46:58 EST Organization: CCI, Communications Systems Division, Rochester, NY Lines: 37 Keywords: bitfields records I'm having a problem with getting bitfields to work. I think that I'm doing what the LRM (13.4) says to do, but the compiler refuses to accept it. Can anybody see what the problem is? Here's the code: package FOOBAR is type DARK_VECTOR_TYPE is record vector: POSITIVE range 0 .. 2#1111111#; parity: POSITIVE range 0 .. 1; end record; for DARK_VECTOR_TYPE use record at mod 8; vector at 0 range 0 .. 6; ----^A ### --### A:error: LRM 13.4(7): not enough space allocated for field parity at 0 range 7 .. 7; ----^A ### --### A:error: LRM 13.4(7): not enough space allocated for field end record; for DARK_VECTOR_TYPE'SIZE use 8; ------------------------------^A ### --### A:error: LRM 13.2(5): specified size is too small for type end FOOBAR; If I increase the space allotted for each field to 32, it works. This will not do for my project, though. Any help would be greatly appreciated. Thanks, Rick Wessman ..!seismo!rochester!cci632!rrw