Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!BGUVM.BITNET!GDAU100 From: GDAU100@BGUVM.BITNET ("Jonathan B. Owen") Newsgroups: comp.lang.ada Subject: converted types as actual in out parameters Message-ID: <8809151803.AA17461@ajpo.sei.cmu.edu> Date: 17 Sep 88 11:18:27 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 43 X-Unparsable-Date: Thu, 15 Sep 88 19:48:29 IST The following worked for Vax-Ada but not for Verdix Ada. Any thoughts? Is it a quirk of Vax-Ada to allow the following or a bug of Verdix which causes the return of erronious values? procedure TEST is a : short_integer; procedure set_value( value : in out integer ) is begin value := 1; end set_value; begin set_value( integer(a) ); if a = 1 then put_line("This is a Vax-Ada compiler!"); else put_line("Is this a Verdix Ada compiler?"); end if; end TEST; The Version of the Verdix Ada I tried was very old (ver. 2?). Maybe in newer version this is corrected. I noticed in this version that the "pack" pragma does not work! Each field of the packed record starts on a new boundry. Also, **** BUG IN VAX-ADA COMPILER ***, try converting a value of type real to short_integer. You will get during compilation "Compiler Internal Error"!. I solved the problem by an intermediate conversion to integer and only then to short_integer. I would appreciate any comments on the above. JB ______________________________________________________________________________ (--) /--) /-(\ Email: gdau100@bguvm (bitnet) \ / /--K | \|/\ /\/) /|-\ Snail: 55 Hovevei Zion _/_/o /L__)_/o \/\__/ \X/ \_/ | |_/ Tel-Aviv, 63346 ISRAEL (/ Jonathan B. Owen Voice: (03) 281-422 Point of view: A chicken is the means by which an egg reproduces an egg. ______________________________________________________________________________