From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,MSGID_SHORT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 9 Nov 91 18:02:59 GMT From: ftpbox!mothost!motcid!bachww@uunet.uu.net (Bud Bach) Subject: Re: Is this legal ? Message-ID: <5637@melon37.UUCP> List-Id: pelakh@convex.com (Boris Pelakh) writes: > Blah, Blah, Blah... >procedure BROKE is > type VAR_LINE(LENGTH : INTEGER := 10) is > record > IMAGE : STRING(1..LENGTH); > end record; > NULL_LINE : VAR_LINE; >begin > null; >end BROKE; This is sort of a FAQ. It has been fairly common for implementations to allocate the maximum possible space in this situation. Is it possible that you could constrain the length to something smaller than "Integer"? procedure Common_Problem is subtype Reasonable_Length is Integer range 1..255; type Var_Line (Length : Reasonable_Length := 10) is record Image : String (1 .. Length); end record; begin null; end Common_Problem; Of course, knowing that the compiler will allocate "Reasonable_Length" characters for each object of type "Var_Line", you might want to choose a different representation. Representations for strings always seem highly application dependent. There has been some recent discussion about string representations in comp.compilers that you may want to reference. Good luck, -- Bud -- Bud Bach - Consultant c/o Motorola 708 632-3449 Cellular Infrastructure Group ...!uunet!motcid!bachww or 1501 W. Shure Drive, MS-1235 bachww%motcid@uunet.uu.net Arlington Heights, IL 60004