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=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 12 Aug 93 15:18:18 GMT From: eachus@mitre-bedford.arpa (Robert I. Eachus) Subject: Re: question about generics Message-ID: List-Id: If you want to create a (ragged) array of strings, you need to have different discriminant values. But the rule in 3.7.2(8) says that the default discriminant is used if there is no constraint in the subtype indication for the array component, so all components of an array have the same constraints. (There is a note at 3.6.1(16) pointing this out, but it really should be in 3.6...) In any case by having a nesting of record types, the discriminant (of the record inside) of each array component can be different. An alternate approach is to have a record containing a current size and a string. The disadvantage is that now equality for objects of the type doesn't work right unless you explicitly set the "unused" bytes to a specific value. I prefer the first approach as there is no distributed cost. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...