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,cafbdf9d858c8e74 X-Google-Attributes: gid103376,public From: Dale Stanbrough Subject: Re: Conceptual Ada Problems Date: 1996/10/01 Message-ID: <52qcce$4i1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 186404686 distribution: world references: content-type: text/plain; charset=ISO-8859-1 x-xxmessage-id: organization: RMIT, Melbourne, Australia mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-10-01T00:00:00+00:00 List-Id: >I have a few questions regarding Ada, which hopefully someone >will be able to answer: > >* Is there some way I would be able to access key fields > of generic data types (records)? I presume you mean accessing the fields of a record inside a generic. Not directly (after all the generic may be instantiated with type integer, which has no fields!). You can supply a function to access components of a record for your. >* Is there some way of storing/retrieving records in an Ada.Direct_IO > file using key fields of records rather than their location in the file? No, you have to build up an index yourself. you could save it to disc of course, rather than building it up each time the program runs. >* I am not quite sure how to declare functions/procedures as formal > parameters to a function/procedure. Declare the subprograms at the library level, and then do... type func_ptr is access function (required profile) required return type you can then take the 'access of a subprogram. >* Also, the Ada compiler complains about some subtype mark being > required, in declaring an array comprising of generic linked lists. > Any suggestions on how to overcome this are more than welcome, as > I have been trying all day, to no avail! you can't have generic linked lists, only generic packages & subprograms. you may have a diff. problem to this, but this is all i can make out of your description. Dale