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: 107e1d,ada59814dca31464 X-Google-Attributes: gid107e1d,public X-Google-Thread: 103376,ada59814dca31464 X-Google-Attributes: gid103376,public X-Google-Thread: 160006,ada59814dca31464 X-Google-Attributes: gid160006,public From: Markus Rogawski Subject: Re: COMPILATION-EXECUTION Date: 1998/12/16 Message-ID: <3677728F.C32AA713@cae-gmbh.de>#1/1 X-Deja-AN: 422803770 Content-Transfer-Encoding: 7bit References: <7560eo$5fk$2@platane.wanadoo.fr> Content-Type: text/plain; charset=us-ascii Organization: Customer of UUNET Deutschland GmbH, Dortmund, Germany Mime-Version: 1.0 Newsgroups: comp.lang.ada,fj.lang.ada,fr.comp.lang.ada Date: 1998-12-16T00:00:00+00:00 List-Id: Oh, very nice! An Christmas riddle! Celinio schrieb: > subtype M is Character range 'A' .. 'Z'; > C: array (M) of Natural; > I: integer : =1; > ************************************** > What can be inferred from the following calls (compilation and then > execution ) ? > C('i'):=1; > compiler: error > C('I'):=I; > natural is a subtype of integer. As long the value of I is an natural it should work. Otherwise it should throw an exception: Constained_error. > C('I'):='I'; > Compiler: error > C(I):=I; > compiler: error > C('I'):=0; Looks ok.Hello Celinio! Why not try it on your compiler? Tsch"o Markus