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.9 required=5.0 tests=BAYES_00,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,132a17fa42920218,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: "zork" Newsgroups: comp.lang.ada Subject: procedures and return Date: Mon, 16 Aug 2004 16:23:56 +1000 Organization: - X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 220.244.246.241 X-Original-NNTP-Posting-Host: 220.244.246.241 Message-ID: <412052f5$1@dnews.tpgi.com.au> X-Trace: dnews.tpgi.com.au!tpg.com.au 1092637429 220.244.246.241 (16 Aug 2004 16:23:49 +1000) Path: g2news1.google.com!news1.google.com!news.glorb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.e.nsc.no!uio.no!newsfeed1.funet.fi!newsfeeds.funet.fi!feeder1.news.jippii.net!news.net.hanse.com!nntp.gblx.net!nntp3.phx1!dnews.tpgi.com.au!tpg.com.au!not-for-mail Xref: g2news1.google.com comp.lang.ada:2747 Date: 2004-08-16T16:23:56+10:00 List-Id: Hi, I am a little confused about how precedures handle a 'return' statement. I have the following: procedure my_procedure (...) begin if then put("inside if-statement); new_line; return; end if; put ("outside if-statement"); end my_procedure; I am finding that if some_condition *is* satisfied, then the procedure prints both put statements i.e. inside if-statement outside if-statement ... i thought 'return' should exit the procedure and return control to where the procedure was called. hence only printing "inside if-statement"? I am using ada95. Any help appreciated! zork