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,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,87557ce53b069315 X-Google-Attributes: gid103376,public From: Nick Roberts Subject: Re: meaning of "current instance" Date: 1999/11/13 Message-ID: <382DB9C1.E3EFFA9E@callnetuk.com>#1/1 X-Deja-AN: 548214875 Content-Transfer-Encoding: 7bit References: <382b8a6f_4@news1.prserv.net> <2hNW3.1742$dp.68215@typhoon-sf.snfc21.pbi.net> X-Original-NNTP-Posting-Host: da132d209.dialup.callnetuk.com X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 13 Nov 1999 19:42:18 GMT, da132d209.dialup.callnetuk.com Organization: Computer Consultant MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-11-13T00:00:00+00:00 List-Id: I think the short answer to your question, Tom, is that the order in which the components of a record type are initialised is not specified by the Ada 95 standard, and so may vary from compiler to compiler. So if you have T.J initialised to T.I, say, this may work on compiler A (which initialises T.I first), and fail on compiler B (which initialises T.J first). In this respect, your code is said to have an "incorrect order dependency", which - in Ada 95 - is a bounded error. One possible way to sidestep the problem is to make T.I a discriminant (with a default). type T (I: Integer := Random(Gen)) is record J: Integer := I; end record; This discriminant could be hidden by making the above declaration the private completion of a public declaration of T with no discriminants. But I'm intrigued as to what you are really trying to do (and why)! -- Nick Roberts Computer Consultant (UK) http://www.callnetuk.com/home/nickroberts http://www.adapower.com/lab/adaos