[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "procedure" vs. "function"
From: |
Jacques Menu |
Subject: |
Re: "procedure" vs. "function" |
Date: |
Sun, 19 Apr 2015 08:42:29 +0200 |
Pascal, as many other languages, has its roots in Algol 60.
In the latter, there was only the « procedure » keyword.
You just prefixed the definition with a type to make it a function, such as:
integer procedure foo (…)
begin
…
foo := …;
...
end;
> Le 18 avr. 2015 à 23:46, Wols Lists <address@hidden> a écrit :
>
> On 18/04/15 22:11, PMA wrote:
>> Aha. So the improper-er their code got, the tougher time
>> compilers had trying to -- as Martin says -- "throw it out".
>>
>> All told, is there now any real need _not_ to use the terms
>> "function" and "procedure" interchangeably? That is, any
>> real need to try to enforce such a distinction? The terms
>> are conflated, everybody knows, and there's no problem.
>>
>> (No response expected -- at this point I'm just ranting.)
>
> Except to me, the terms "function" and "procedure" are NOT the same
> thing :-)
>
> A function has a return value, a subroutine does not. A procedure can be
> either.
>
> Cheers,
> Wol
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
- Re: "procedure" vs. "function", (continued)
- Re: "procedure" vs. "function", Jacques Menu, 2015/04/18
- Re: "procedure" vs. "function", David Nalesnik, 2015/04/18
- Re: "procedure" vs. "function", PMA, 2015/04/18
- Re: "procedure" vs. "function", PMA, 2015/04/18
- Re: "procedure" vs. "function", J Martin Rushton, 2015/04/18
- Re: "procedure" vs. "function", PMA, 2015/04/18
- Re: "procedure" vs. "function", J Martin Rushton, 2015/04/18
- Re: "procedure" vs. "function", Wols Lists, 2015/04/18
- Re: "procedure" vs. "function", PMA, 2015/04/18
- Re: "procedure" vs. "function", Wols Lists, 2015/04/18
- Re: "procedure" vs. "function",
Jacques Menu <=
- Re: "procedure" vs. "function", PMA, 2015/04/19
Re: "procedure" vs. "function", Andrew Bernard, 2015/04/19