From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!menudo.uh.edu!buster!brain!chuck From: chuck@brain.UUCP (Chuck Shotton) Newsgroups: comp.lang.ada Subject: LRM Oddity Message-ID: Date: 28 Jun 91 23:13:00 GMT Reply-To: chuck@brain.uucp Organization: BIAP Systems X-Mailer: uAccess - Mac Release: 1.5 List-Id: I ran into this oddity today. Can someone please explain the rationale behind it? type record_type is record a, b: integer; end record; a_var : array (1..3) of record_type := ((1,2), (3,4), (5,6)); -- syntax OK another_var : array (1..1) of record_type := ((1,2)); -- compiler error one_more_var : array (1..1) of record_type := (1 => (1,2)); -- syntax OK Apparently, Ada requires that initialized arrays with only ONE element must use positional specifications for the initialization data. But, if there is more than one element, the positional specification (ex. 1 => ) is not required. WHY? (I can only assume that it makes it clear that the "(1,2)" initializes to a single array element and not two. Seems sort of odd.... ----------------------------------------------------------------------- Chuck Shotton Internet: cshotton@girch1.med.uth.tmc.edu BIAP Systems UUCP: ...!buster!brain!chuck "Your silly quote here." AppleLink: D1683 MacNet: shotton