class: MessageSend
authorClaus Gittinger <cg@exept.de>
Fri, 27 Mar 2015 12:21:29 +0100
changeset 17696 bdccf4ca66ba
parent 17695 2f478cffbfab
child 17697 c88f1b712134
class: MessageSend comment/format in: #cull: #cull:cull: #cull:cull:cull:
MessageSend.st
--- a/MessageSend.st	Fri Mar 27 11:41:00 2015 +0100
+++ b/MessageSend.st	Fri Mar 27 12:21:29 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
 	      All Rights Reserved
@@ -11,6 +13,8 @@
 "
 "{ Package: 'stx:libbasic' }"
 
+"{ NameSpace: Smalltalk }"
+
 Message subclass:#MessageSend
 	instanceVariableNames:'receiver'
 	classVariableNames:''
@@ -162,39 +166,42 @@
 
 !MessageSend methodsFor:'Compatibility-Squeak'!
 
-cull: firstArg 
-    "activate the receiver with one or zero arguments"
+cull: optionalFirstArg 
+    "activate the receiver with one or zero arguments.
+     Squeak compatibility, but also present in VW Smalltalk"
 
-    selector numArgs >= 1 ifTrue:[^ self value:firstArg].
+    selector numArgs >= 1 ifTrue:[^ self value:optionalFirstArg].
     ^ self value
 
     "Modified: / 03-06-2014 / 12:40:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-cull: firstArg cull: secondArg
-    "activate the receiver with two or less arguments"
+cull: optionalFirstArg cull: optionalSecondArg
+    "activate the receiver with two or less arguments.
+     Squeak compatibility, but also present in VW Smalltalk"
 
     | nargs |
 
     nargs := selector numArgs.
-    nargs >= 2 ifTrue:[^ self value:firstArg value:secondArg].
-    nargs = 1 ifTrue:[^ self value:firstArg].
+    nargs >= 2 ifTrue:[^ self value:optionalFirstArg value:optionalSecondArg].
+    nargs = 1 ifTrue:[^ self value:optionalFirstArg].
     ^ self value
 
     "Modified (format): / 03-06-2014 / 12:40:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-cull: firstArg cull: secondArg cull: thirdArg
-    "activate the receiver with three or less arguments"
+cull: firstArg cull: optionalSecondArg cull: optionalThirdArg
+    "activate the receiver with three or less arguments.
+     Squeak compatibility, but also present in VW Smalltalk"
 
     | nargs |
 
     nargs := selector numArgs.
     nargs >= 2 ifTrue:[
         nargs >= 3 ifTrue:[
-            ^ self value:firstArg value:secondArg value:thirdArg
+            ^ self value:firstArg value:optionalSecondArg value:optionalThirdArg
         ].
-        ^ self value:firstArg value:secondArg
+        ^ self value:firstArg value:optionalSecondArg
     ].
     nargs = 1 ifTrue:[^ self value:firstArg].
     ^ self value
@@ -348,10 +355,10 @@
 !MessageSend class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.25 2014-06-03 11:41:54 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.26 2015-03-27 11:21:29 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.25 2014-06-03 11:41:54 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.26 2015-03-27 11:21:29 cg Exp $'
 ! !