Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!uflorida!novavax!augusta!bs From: bs@augusta.UUCP (Burch Seymour) Newsgroups: comp.lang.ada Subject: Re: converted types as actual in out parameters Message-ID: <1300@augusta.UUCP> Date: 23 Sep 88 15:41:55 GMT References: <8809151803.AA17461@ajpo.sei.cmu.edu> Organization: Gould CSD, Fort Lauderdale, FL Lines: 24 in article <8809151803.AA17461@ajpo.sei.cmu.edu>, GDAU100@BGUVM.BITNET ("Jonathan B. Owen") says: > > 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? (text of test omitted) I ran this on the Gould compiler (Telesoft - Telegen 2) and it got the "Vax" result. I check the generated code and this is what happened: 1) The short integer is moved onto the stack - no check needed as a small is converted to a large. 2) The procedure is called. The result is on the stack at return as type integer. 3) The result is checked for range as a large is being converted to a smaller type. 4) The result is put away. I'm not a language lawyer, but this seems to be the way to do this. I'd guess the Verdix has a bug. -Burch Seymour - Gould CSD