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,2afac1a4161c7f35 X-Google-Attributes: gid103376,public From: Dale Stanbrough Subject: Re: Two simple language questions Date: 1998/01/07 Message-ID: <68vkhf$2of$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 313583869 Content-Transfer-Encoding: 8bit References: <68uq34$7tk@tomquartz.niestu.com> X-XXMessage-ID: Mime-Version: 1.0 Distribution: world Content-Type: text/plain; charset=ISO-8859-1 Organization: RMIT Newsgroups: comp.lang.ada Date: 1998-01-07T00:00:00+00:00 List-Id: In article <68uq34$7tk@tomquartz.niestu.com> Chip Richards, chipr@niestu.com writes: > strs: StringArr := > ( > new string'("Line 1"), > new string'("Line 2"), > ... > new string'("Line the Last") > ); re ragged arrays.. not as easy as in C . The solution is to simulate what the C compiler does. A snippet from an ada95 update i did to the anna toolkit prolog interpreter. type Acc_String is access constant String; Var_Space_Str : aliased constant String := "out of variable name space"; Wierd_Ch_Str : aliased constant String := "illegal character in input"; Fault_Str : aliased constant String := "internal error"; In_File_Depth_Str : aliased constant String := "nesting-level of 'see' is to deep"; Out_File_Depth_Str : aliased constant String := "nesting-level of 'tell' is to deep"; File_Name_Str : aliased constant String := "file-name error"; File_Status_Str : aliased constant String := "status error"; Init_Str : aliased constant String := "error during initialization"; Err_Array : array (Error_Type) of Acc_String := ( Arity_Error => Arity_Str'Access, Assert_Error => Assert_Str'Access, Atom_Space_Error => Atom_Space_Str'Access, Bad_Cdd_Error => Bad_Cdd_Str'Access, Bad_Char_Error => Bad_Char_Str'Access, Bad_Delim_Error => Bad_Delim_Str'Access, Bad_Exp_Error => Bad_Exp_Str'Access, Call_Error => Call_Str'Access, Clause_Error => Clause_Str'Access, Comment_Error => Comment_Str'Access, Dale