9 other person. No title to or ownership of the software is |
11 other person. No title to or ownership of the software is |
10 hereby transferred. |
12 hereby transferred. |
11 " |
13 " |
12 "{ Package: 'stx:libbasic' }" |
14 "{ Package: 'stx:libbasic' }" |
13 |
15 |
|
16 "{ NameSpace: Smalltalk }" |
|
17 |
14 Message subclass:#MessageSend |
18 Message subclass:#MessageSend |
15 instanceVariableNames:'receiver' |
19 instanceVariableNames:'receiver' |
16 classVariableNames:'' |
20 classVariableNames:'' |
17 poolDictionaries:'' |
21 poolDictionaries:'' |
18 category:'Kernel-Methods' |
22 category:'Kernel-Methods' |
160 "Modified: 20.3.1997 / 21:55:44 / cg" |
164 "Modified: 20.3.1997 / 21:55:44 / cg" |
161 ! ! |
165 ! ! |
162 |
166 |
163 !MessageSend methodsFor:'Compatibility-Squeak'! |
167 !MessageSend methodsFor:'Compatibility-Squeak'! |
164 |
168 |
165 cull: firstArg |
169 cull: optionalFirstArg |
166 "activate the receiver with one or zero arguments" |
170 "activate the receiver with one or zero arguments. |
167 |
171 Squeak compatibility, but also present in VW Smalltalk" |
168 selector numArgs >= 1 ifTrue:[^ self value:firstArg]. |
172 |
|
173 selector numArgs >= 1 ifTrue:[^ self value:optionalFirstArg]. |
169 ^ self value |
174 ^ self value |
170 |
175 |
171 "Modified: / 03-06-2014 / 12:40:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
176 "Modified: / 03-06-2014 / 12:40:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
172 ! |
177 ! |
173 |
178 |
174 cull: firstArg cull: secondArg |
179 cull: optionalFirstArg cull: optionalSecondArg |
175 "activate the receiver with two or less arguments" |
180 "activate the receiver with two or less arguments. |
|
181 Squeak compatibility, but also present in VW Smalltalk" |
176 |
182 |
177 | nargs | |
183 | nargs | |
178 |
184 |
179 nargs := selector numArgs. |
185 nargs := selector numArgs. |
180 nargs >= 2 ifTrue:[^ self value:firstArg value:secondArg]. |
186 nargs >= 2 ifTrue:[^ self value:optionalFirstArg value:optionalSecondArg]. |
181 nargs = 1 ifTrue:[^ self value:firstArg]. |
187 nargs = 1 ifTrue:[^ self value:optionalFirstArg]. |
182 ^ self value |
188 ^ self value |
183 |
189 |
184 "Modified (format): / 03-06-2014 / 12:40:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
190 "Modified (format): / 03-06-2014 / 12:40:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
185 ! |
191 ! |
186 |
192 |
187 cull: firstArg cull: secondArg cull: thirdArg |
193 cull: firstArg cull: optionalSecondArg cull: optionalThirdArg |
188 "activate the receiver with three or less arguments" |
194 "activate the receiver with three or less arguments. |
|
195 Squeak compatibility, but also present in VW Smalltalk" |
189 |
196 |
190 | nargs | |
197 | nargs | |
191 |
198 |
192 nargs := selector numArgs. |
199 nargs := selector numArgs. |
193 nargs >= 2 ifTrue:[ |
200 nargs >= 2 ifTrue:[ |
194 nargs >= 3 ifTrue:[ |
201 nargs >= 3 ifTrue:[ |
195 ^ self value:firstArg value:secondArg value:thirdArg |
202 ^ self value:firstArg value:optionalSecondArg value:optionalThirdArg |
196 ]. |
203 ]. |
197 ^ self value:firstArg value:secondArg |
204 ^ self value:firstArg value:optionalSecondArg |
198 ]. |
205 ]. |
199 nargs = 1 ifTrue:[^ self value:firstArg]. |
206 nargs = 1 ifTrue:[^ self value:firstArg]. |
200 ^ self value |
207 ^ self value |
201 |
208 |
202 "Modified: / 03-06-2014 / 12:40:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
209 "Modified: / 03-06-2014 / 12:40:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |