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,22dff575e187f5a2,start X-Google-Attributes: gid103376,public From: Mark J Gallagher Subject: Passing arrays as record fields Date: 1997/06/12 Message-ID: <33A00D4C.F4E@taz.dra.hmg.gb>#1/1 X-Deja-AN: 247826462 Organization: DERA Newsgroups: comp.lang.ada Date: 1997-06-12T00:00:00+00:00 List-Id: Please forgive me if I am overlooking something very obvious, but: I am attemting to implement a back-propagated feed-forward neural network in ADA 95 using the latest release of gnat. I have a record defined as type Count_t is Integer range 0 .. Integer'Last; type Count_a is array (Integer range <>) of Count_t; type Net_t(... N_Neurons: Count_t ...) is record ... Neuron_Counts: Count_a(N_Neurons); ... end record; and a procedure procedure Initialise(Net: in out Net_t); I can declare a variable Net of type Net_t and assign an array to the Neuron_Counts field, which I can read from the block in which Net has been declared. However, when I attempt to read the array from the procedure Initialise, I get garbage. Help!