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=-0.3 required=5.0 tests=BAYES_00,LOTS_OF_MONEY, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,75a8a3664688f227 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-07 11:18:08 PST Path: supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttls1.wa.home.com.POSTED!not-for-mail Reply-To: "DuckE" From: "DuckE" Newsgroups: comp.lang.ada References: Subject: Re: Parameter Modes, In In Out and Out X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <4f366.240648$U46.7538807@news1.sttls1.wa.home.com> Date: Sun, 07 Jan 2001 19:15:12 GMT NNTP-Posting-Host: 24.6.221.63 X-Complaints-To: abuse@home.net X-Trace: news1.sttls1.wa.home.com 978894912 24.6.221.63 (Sun, 07 Jan 2001 11:15:12 PST) NNTP-Posting-Date: Sun, 07 Jan 2001 11:15:12 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: supernews.google.com comp.lang.ada:3759 Date: 2001-01-07T19:15:12+00:00 List-Id: "i.a.mcleod" wrote in message news:Zmt56.57012$ca6.937797@news6-win.server.ntlworld.com... > What is the difference between In Out and Out parameters according to the > way compilers handle these. I can't see any difference. An out parameter > is still taken in. I am confused by this anyone help? > > I'm not sure whether all compilers handle this the same, but with the compiler I use most frequently: A parameter that is passed as an "In Out" will have a constraint check on entry to the procedure and a parameter passed as "Out" will not. This became obvious to me when translating Pascal code to Ada 95. In Pascal it is common to pass an uninitialized variable as a "VAR" parameter to a procedure. In Pascal this did not result in an exception. Using an Ada "In Out" sometimes causes a constraint error exception and using Adas' "Out" does not. SteveD