[prev in list] [next in list] [prev in thread] [next in thread]
List: squeak-dev
Subject: [squeak-dev] The Trunk: Kernel-topa.1173.mcz
From: commits () source ! squeak ! org
Date: 2018-05-30 14:54:49
Message-ID: E1fO2VD-000554-9Y () andreas
[Download RAW message or body]
Tobias Pape uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-topa.1173.mcz
==================== Summary ====================
Name: Kernel-topa.1173
Author: topa
Time: 30 May 2018, 4:54:31.858379 pm
UUID: 1327e5ed-7d9c-48d4-8ff9-3d6a41a4ce73
Ancestors: Kernel-mt.1172
SubclassResp #asBit to Boolean (All other Boolean-subclass methods are overrides anyway)
For convenience, add #asNumber/#asInteger for the most common interpretation of booleans as numbers.
=============== Diff against Kernel-mt.1172 ===============
Item was added:
+ ----- Method: Boolean>>asBit (in category 'printing') -----
+ asBit
+ "My numerical interpretation, as one-bit number. This extends nicely to n-bit numbers,
+ as long as they treat 0 as false, and anything else as true"
+ ^ self subclassResponsibility!
Item was added:
+ ----- Method: Boolean>>asInteger (in category 'converting') -----
+ asInteger
+ "It is sufficient to treat this boolean as bit so as to interpret it as a number"
+ ^ self asBit!
Item was added:
+ ----- Method: Boolean>>asNumber (in category 'converting') -----
+ asNumber
+ "It is sufficient to treat this boolean as bit so as to interpret it as a number"
+ ^ self asBit!
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic