--- a/CheapBlk.st Thu Jan 23 14:37:03 1997 +0100
+++ b/CheapBlk.st Thu Jan 23 15:23:52 1997 +0100
@@ -105,6 +105,33 @@
"Created: 21.10.1996 / 13:58:29 / cg"
! !
+!CheapBlock methodsFor:'conversion'!
+
+beVarArg
+ "convert myself into a varArg block;
+ this one has 1 formal argument, which gets the list
+ of actual arguments when evaluated."
+
+ nargs ~~ 1 ifTrue:[
+ self error:'vararg blocks must take exactly 1 argument - the arg list'.
+ ^ nil
+ ].
+
+ self changeClassTo:VarArgCheapBlock.
+ ^ self
+
+ "
+ |b|
+
+ b := [:argList | argList printCR] beVarArg.
+ b value.
+ b value:'arg1' value:'arg2' value:'arg3' value:'arg4'
+ "
+
+ "Created: 23.1.1997 / 13:35:28 / cg"
+ "Modified: 23.1.1997 / 13:35:48 / cg"
+! !
+
!CheapBlock methodsFor:'printing & storing'!
printOn:aStream
@@ -140,5 +167,5 @@
!CheapBlock class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/CheapBlk.st,v 1.17 1997-01-23 12:45:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/CheapBlk.st,v 1.18 1997-01-23 14:23:39 cg Exp $'
! !