lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "procedure" vs. "function"


From: PMA
Subject: Re: "procedure" vs. "function"
Date: Sat, 18 Apr 2015 14:56:17 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20101227 Iceape/2.0.11

Jacques Menu wrote:
Hello,

Yes, historically a disctinction was made between the « sub-programs » that 
return a value and those that don’t, but the Scheme docs seem to use the terms 
function and procedure interchangeably.

In C++, everything is a function : a procedure is merely a function that 
returns a value of the « void » type, i.e. no value.

JM

Le 18 avr. 2015 à 18:33, David Nalesnik<address@hidden>  a écrit :



On Sat, Apr 18, 2015 at 4:51 AM, Urs 
Liska<address@hidden<mailto:address@hidden>>  wrote:
Hi all,

I just stumbled over a terminology issue: are "procedure" and "function" 
synonyms in Scheme or do they refer to different things?

 From my earliest experiences with programming I'd recall the difference to be 
that functions return a value and procedures don't. But that's clearly not the 
case in Scheme.

Any enlightenment available?

Well, I'm guilty of using them interchangeably...

Anyway, maybe the following will help -- or add to the confusion :)

http://stackoverflow.com/questions/721090/what-is-the-difference-between-a-function-and-a-procedure<http://stackoverflow.com/questions/721090/what-is-the-difference-between-a-function-and-a-procedure>

DN

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
Hi List --

AFAIK, of our major ancestor languages, only Pascal insisted on a literal working function-vs-procedure distinction. Did Wirth ever defend this insistence (as more than a track-keeping enforcer re value-outputting vs non-value-outputting code)?

PMA



reply via email to

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