comp.lang.ada
 help / color / mirror / Atom feed
From: Jan Prazak <janp9@gmx.net>
Subject: Re: exit from a procedure
Date: Mon, 15 Jul 2002 18:10:32 -0100
Date: 2002-07-15T18:10:32-01:00	[thread overview]
Message-ID: <pan.2002.07.15.15.48.10.602943.1135@gmx.net> (raw)
In-Reply-To: 3d32bb2d.14256746@news.essex.ac.uk

On Mon, 15 Jul 2002 11:14:26 -0100, Steve Sangwine wrote:


> The return (or RETURN) statement has been the absolutely standard way of
> returning from a procedure in many  languages (e.g. FORTRAN 66, BASIC)
> for decades. So why the ???? marks?

Because "return" is used in Ada for returning a value from a function, so
using the same keyword in a procedure looks strange. But there it's of
course without a value. But it's ok now, now I understand that "return"
in a procedure doesn't mean "return a value", but just "return" in the
meaning of "go back" to caller.
But I think it's clearer in Pascal, there it's "exit" (a loop exit is
called "quit" there).

> Maybe it would be a good idea to
> learn a bit about programming history .....

No, thanks... I don't have the time to learn dead languages, but it could
be interesting, indeed (but probably also frustrating, I have seen Towers
Of Hanoi in 10 different languages, some of the code had 10 lines
(Pascal, C...) and some even 100 lines).

Jan




  reply	other threads:[~2002-07-15 19:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-14  0:14 exit from a procedure Jan Prazak
2002-07-13 21:45 ` chris.danx
2002-07-13 22:27 ` tmoran
2002-07-14 21:16   ` Jan Prazak
2002-07-15 12:14     ` Steve Sangwine
2002-07-15 19:10       ` Jan Prazak [this message]
2002-07-16  8:30         ` Gautier
2002-07-16 14:08           ` Jan Prazak
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox