lilypond-user
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]