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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,85ee038f08622eb8,start X-Google-Attributes: gid103376,public From: cosc19z5@Bayou.UH.EDU (Spasmo) Subject: Array Literals? Date: 1996/08/12 Message-ID: <4uo9b6$qj1@Masala.CC.UH.EDU>#1/1 X-Deja-AN: 173768762 organization: University of Houston newsgroups: comp.lang.ada Date: 1996-08-12T00:00:00+00:00 List-Id: Hey all. I've got a question about array literals. I looked through the RM (checked out the index and hopped to the keywords that looked promising) but I couldn't find the answer to this question. Ok for my question. Is it valid on all Ada implementations to provide array literals to functions and the like? I know that Gnat let me do it but I'd just like to make sure this is guaranteed to work regardless of implementation. For example: type Int_Array is array(Integer range <>) of Integer; procedure Print_Int_Array ( I_List : Int_Array ) is begin for I in I_List'Range loop Put_Line( Integer'Image ( I_List(I) ) ); end loop; end Print_Int_Array; Now when we call it, is it standardly acceptable to call it as such: Print_Int_Array ( (1, 2, 3, 4) ); Where (1, 2, 3, 4) is an array literal? I know it works in GNAT3.05 but I want to make sure this isn't a fluke and that I can depend on this behavior regardless of which implementation I use. So this would mean that array literals are in fact flexible enough to be used anywhere an array can be used eh? Thanks in advance. -- Spasmo "Everyone has secrets, but sometimes you get caught, So if it's just between us, my silence can be bought" "Blackmail" by Sloppy Seconds