Smalltalk/X has both #min:max: and #clampBetween:and:
in its Magnitude.st. Dolphin 7 has neither.
The definition of #clampBetween:and: in ST/X is
clampBetween: min and: max
max < self ifTrue: [^max].
self < min ifTrue: [^min].
^self
I've deleted the comment because it doesn't help w
On 22 April 2018 at 05:59, PBKResearch wrote:
> I can find no reference to #min:max: in Dolphin X6.1.
>
> Peter Kenny
>
> -Original Message-
> From: Pharo-users On Behalf Of
> Hilaire
> Sent: 21 April 2018 17:36
> To: pharo-users@lists.pharo.org
> Subj
I can find no reference to #min:max: in Dolphin X6.1.
Peter Kenny
-Original Message-
From: Pharo-users On Behalf Of Hilaire
Sent: 21 April 2018 17:36
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] min:max:
The #min:max: message is present in the Squeak/Pharo/Cuis familly
The #min:max: message is present in the Squeak/Pharo/Cuis familly but
not in GNU Smalltalk for example. No idea about the other ones.
Le 21/04/2018 à 00:12, Chris Cunningham a écrit :
A name like this would be clearer (although much more annoying):
returnAtLeast: minValue butNoMoreThan: maxVa
Yes :)
On Sat, Apr 21, 2018 at 4:21 PM, Sven Van Caekenberghe wrote:
>
>
>> On 21 Apr 2018, at 15:35, Stephane Ducasse wrote:
>>
>> Oh yes
>>
>> On Sat, Apr 21, 2018 at 12:12 AM, Chris Cunningham
>> wrote:
>>> A name like this would be clearer (although much more annoying):
>>>
>>> returnA
> On 21 Apr 2018, at 15:35, Stephane Ducasse wrote:
>
> Oh yes
>
> On Sat, Apr 21, 2018 at 12:12 AM, Chris Cunningham
> wrote:
>> A name like this would be clearer (although much more annoying):
>>
>> returnAtLeast: minValue butNoMoreThan: maxValue
>>10 returnAtLeast: 12 butNoMoreTha
Oh yes
On Sat, Apr 21, 2018 at 12:12 AM, Chris Cunningham
wrote:
> A name like this would be clearer (although much more annoying):
>
> returnAtLeast: minValue butNoMoreThan: maxValue
> 10 returnAtLeast: 12 butNoMoreThan: 48
>
> Thanks,
> cbc
>
> On Fri, Apr 20, 2018 at 12:51 PM, Hilaire
On Fri, Apr 20, 2018 at 9:51 PM, Hilaire wrote:
> Hi,
>
> Out of curiosity.
>
> I always found the #min:max: confusing and lost in its expressiveness.
>
> One should write:
>
> 10 min: 48 max: 12
I do not understand the result :)
To me this method is illnamed.
>
> to expect 12.
>
> but logi
On 21 April 2018 at 03:51, Hilaire wrote:
> Hi,
>
> Out of curiosity.
>
> I always found the #min:max: confusing and lost in its expressiveness.
>
> One should write:
>
> 10 min: 48 max: 12
>
> to expect 12.
>
> but logically one (at least me) may want to express it as:
>
> 10 min: 12 max
On April 21, 2018 12:12:10 AM GMT+02:00, Chris Cunningham
wrote:
>A name like this would be clearer (although much more annoying):
>
>returnAtLeast: minValue butNoMoreThan: maxValue
>10 returnAtLeast: 12 butNoMoreThan: 48
#beBetween:and:
or
#boundedBetween:and:
>Thanks,
>cbc
>
>On Fri, Ap
A name like this would be clearer (although much more annoying):
returnAtLeast: minValue butNoMoreThan: maxValue
10 returnAtLeast: 12 butNoMoreThan: 48
Thanks,
cbc
On Fri, Apr 20, 2018 at 12:51 PM, Hilaire wrote:
> Hi,
>
> Out of curiosity.
>
> I always found the #min:max: confusing and lo
Hi,
Out of curiosity.
I always found the #min:max: confusing and lost in its expressiveness.
One should write:
10 min: 48 max: 12
to expect 12.
but logically one (at least me) may want to express it as:
10 min: 12 max: 48
Then when reading its source code, it is even more confusing
12 matches
Mail list logo