--- a/VarArgBlock.st Thu Jan 23 05:59:09 1997 +0100
+++ b/VarArgBlock.st Thu Jan 23 13:38:43 1997 +0100
@@ -1,3 +1,17 @@
+"
+ COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+
+
+
Block subclass:#VarArgBlock
instanceVariableNames:''
classVariableNames:''
@@ -33,11 +47,16 @@
Create a variableArgument block by sending #varArgs to a regular
block.
+ This is a goody add-on, which may not be available/possible in other
+ smalltalk implementations. Do not use it if cross-platform
+ portability is required.
+
+
[author:]
- Claus Gittinger
+ Claus Gittinger
[see also:]
- Block
+ Block
"
!
@@ -45,26 +64,26 @@
examples
"
the same block, evaluated with 2 or 5 arguments:
- [exBegin]
+ [exBegin]
|b|
- b := [:args | Transcript show:'wow: '; showCR:args] varArgs.
+ b := [:args | Transcript show:'wow: '; showCR:args] beVarArg.
b value:'hi' value:'there'.
b value:'hello' value:'there' value:'how' value:'about' value:'this'.
- [exEnd]
+ [exEnd]
does it accept a variable number of arguments ?:
- [exBegin]
+ [exBegin]
|b|
b := [:args | Transcript showCR:args].
Transcript showCR:(b isVarArgBlock).
- b := [:args | Transcript showCR:args] varArgs.
+ b := [:args | Transcript showCR:args] beVarArg.
Transcript showCR:(b isVarArgBlock)
- [exEnd]
+ [exEnd]
"
"Created: 23.1.1997 / 04:57:26 / cg"
@@ -196,4 +215,8 @@
"Created: 23.1.1997 / 05:00:18 / cg"
! !
+!VarArgBlock class methodsFor:'documentation'!
+version
+ ^ '$Header: /cvs/stx/stx/libbasic/VarArgBlock.st,v 1.2 1997-01-23 12:38:43 cg Exp $'
+! !