--- a/Block.st Fri Dec 14 10:55:24 2001 +0100
+++ b/Block.st Fri Dec 14 10:57:05 2001 +0100
@@ -1201,6 +1201,16 @@
^ ArgumentSignal
raiseRequestWith:self
errorString:'only blocks with up-to 12 arguments supported'
+!
+
+valueWithOptionalArgument:arg
+ "evaluate the receiver.
+ Optionally pass an argument (if required)."
+
+ self numArgs == 1 ifTrue:[
+ ^ self value:arg
+ ].
+ ^ self value
! !
!Block methodsFor:'exception handling'!
@@ -1882,6 +1892,6 @@
!Block class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.108 2001-12-04 17:29:06 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.109 2001-12-14 09:57:05 cg Exp $'
! !
Block initialize!