[Top][All Lists]

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

Re: [Help-smalltalk] Subroutines

From: Stefan Schmiedl
Subject: Re: [Help-smalltalk] Subroutines
Date: Tue, 1 Nov 2005 09:27:14 +0100
User-agent: Mutt/1.5.8i

Kenny Holtz (31.10. 21:15):

> I am doing a project on smalltalk and cant find any info on this.

You can, if you look at some of the excellent books at

Short answers:

> 1.  Does smalltalk support some type of routines?

yes: methods

> 2.  Can subroutines have local variables?


> 3.  Can subroutines have parameters? If so, how are parameters passed? 
> (Pass by value? Pass by reference? Pass by value-result? etc.) Is there 
> some symbol or keyword in the program that specifies how a particular 
> parameter will be passed?

yes: objects are passed around all the time, there is nothing else in

> 4.  Can a subroutine return a value? Must a subroutine always return a 
> value?

yes. If *you* don't return a value, the receiving object of the message
is returned as result.

> Any help would be great

Don't be content with the one-liners above. Dig into the books and
help yourself. You'll enjoy it.


Stefan Schmiedl
|Approximity GmbH               | EDV-Beratung Schmiedl                  |
|     | Am Bräuweiher 4, 93499 Zandt, Germany  |
|mailto:address@hidden  | Tel. (09944) 3068-98, Fax -97          |

reply via email to

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