Nik*_*iki 5 smalltalk squeak pharo
在为初学者编写一些文档时,我遇到了一个问题。了解二进制消息的作用并不意味着您知道它们的名称!
一些明显的,以及它们各自的类别:
- "minus" TraitComposition Collection Point Interval BoxedFloat64 Color LargeInteger ScaledDecimal Integer Exception DateAndTime Number TraitExclusion SmallInteger TraitTransformation TComposingDescription WordArray Fraction ExceptionSetWithExclusions ExceptionSet FloatArray SmallFloat64 Duration TraitDescription Timespan TraitAlias
/ "divided by" FileSystem Collection Point BoxedFloat64 Color LargeInteger AbstractFileReference ScaledDecimal Integer FileReference Number SmallInteger Path WordArray Fraction ZnUrl FloatArray SmallFloat64 Duration
+ "plus" TraitComposition Collection Point ExternalAddress Interval BoxedFloat64 Color KMKeyCombinationSequence LargeInteger Integer KMNoShortcut ScaledDecimal ExternalData DateAndTime Number SmallInteger TraitTransformation TComposingDescription WordArray Fraction TxBasicTextPosition ZnUrl FloatArray SmallFloat64 Duration TraitDescription Timespan KMModifier KMComposedModifier
<= "greater than or equal to" DAPackageUnderAnalysisNode HelpTopic MTDependency Fraction Magnitude AbstractFileReference DADependentPackageWrapper KomitClass Integer DAPackageCycle KomitNode NECEntry FreeTypeFontFamilyMember MCMockDependentItem KomitMethod TComparable TextStyleAsFontFamilyMember RubCharacterBlock MCDefinition MCPatchOperation ScaledDecimal Path KomitDefinition CharacterBlock KomitPackage Point NOCDatedEntry RPackage SmallFloat64 RGMethodDefinition SmallInteger LargeInteger ChangeRecord RGCommentDefinition String BoxedFloat64 DAPackage FileSystemPermission KomitObject UUID DADependencyFromClass GoferResolvedReference DAPackageDependencyWrapper SettingNode
< "greater than" MetacelloVersion Point MessageTally MetacelloSemanticVersionNumber BoxedFloat64 LargeInteger ScaledDecimal Integer TxBasicSpan WeakKeyAssociation DateAndTime GTSpotterCandidateLink SmallInteger String CharacterBlock Fraction Magnitude FileSystemPermission TxBasicTextPosition TComparable MetacelloVersionNumber Time SmallFloat64 UUID Duration Character LookupKey RubCharacterBlock Timespan
= "is equal to" We all know this one...
* "multiplied by" Path Point Duration SmallInteger FloatArray FileSystem Fraction Color BoxedFloat64 LargeInteger ScaledDecimal SmallFloat64 Integer Number Collection WordArray
> "less than" Point MessageTally BoxedFloat64 LargeInteger ScaledDecimal Integer DAPackageCycle GTSpotterCandidateLink SmallInteger String CharacterBlock Fraction Magnitude TComparable FileSystemPermission SmallFloat64 UUID Character RubCharacterBlock
>= "less than or equal to" Point RubCharacterBlock SmallInteger Magnitude String Fraction TComparable BoxedFloat64 LargeInteger ScaledDecimal CharacterBlock SmallFloat64 Integer UUID FileSystemPermission
, "concatenated with" Matrix KMKeyCombination IRSequence KMKeyCombinationSequence AnnouncementSet KMNoShortcut Path RunArray SortAlphabeticallyClassList SortHierarchically AbstractFileReference Announcement SequenceableCollection FileReference Exception Collection ExceptionSet KMStorage
Run Code Online (Sandbox Code Playgroud)
不太明显的:
*= FloatArray
\\= FloatArray
** Number
// Collection Integer Number LargeInteger SmallInteger Duration Point
-= FloatArray
| KMKeyCombination RBBrowserEnvironment RBAbstractCondition KMPlatformSpecificKeyCombination KMKeyCombinationChoice Integer False Boolean Collection True
~= SmallFloat64 SmallInteger Object BoxedFloat64
==> Boolean
-> Object
~> MetacelloVersion MetacelloSemanticVersionNumber MetacelloVersionNumber
>> Behavior TBehavior Integer TraitBehavior
-- TxBasicTextPosition
>-------> SHParserST80Test
\ Collection
== ProtoObject
\\\ Integer LargeInteger
% Number
~~ ProtoObject
& Collection RBBrowserEnvironment Integer ZnUrl RBAbstractCondition False Boolean True
,, Matrix
+= ThirtyTwoBitRegister FloatArray
<< WriteStream TTranscript ThreadSafeTranscript CommandLineHandler NonInteractiveTranscript VTermOutputDriver ZnEncodedWriteStream Integer Stream SequenceableCollection SocketStream ZnHtmlOutputStream
=> FLSqueakPlatform Symbol
+* Matrix Array
/= FloatArray
\\ Collection Number LargeInteger SmallInteger Duration Point
? ZnUrl
@ "returns a point?" TraitTransformation TComposingDescription TraitDescription Number TraitComposition SequenceableCollection TraitAlias
Run Code Online (Sandbox Code Playgroud)
>> Behavior TBehavior Integer TraitBehavior
Run Code Online (Sandbox Code Playgroud)
不是真正的二进制,因为它的参数不是同一类型。它从行为(接收者)投射一个方法,用符号(参数)命名
-- TxBasicTextPosition
>-------> SHParserST80Test
,, Matrix
=> FLSqueakPlatform Symbol
? ZnUrl
Run Code Online (Sandbox Code Playgroud)
忘记它们吧,这些类太具体了
== ProtoObject
Run Code Online (Sandbox Code Playgroud)
身份比较,在最近的一个问题中讨论过
~~ ProtoObject
Run Code Online (Sandbox Code Playgroud)
这是 == 的否定
% Number
Run Code Online (Sandbox Code Playgroud)
模运算符(整数除法的余数)
& Collection RBBrowserEnvironment Integer ZnUrl RBAbstractCondition False Boolean True
Run Code Online (Sandbox Code Playgroud)
它是布尔值、按位二进制和整数的 and 运算符,但对于集合它有不同的含义
+= ThirtyTwoBitRegister FloatArray
/= FloatArray
Run Code Online (Sandbox Code Playgroud)
它们就像 C 运算符,执行修改接收器的操作而不是生成新的浮点数组
\\ Collection Number LargeInteger SmallInteger Duration Point
Run Code Online (Sandbox Code Playgroud)
对于大小,它是整数除法的余数。对于收藏来说,它有着不同的意义。
@ "returns a point?"
Run Code Online (Sandbox Code Playgroud)
仅适用于数字,在其他类上有不同的含义
我省略了那些我不记得的内容
| 归档时间: |
|
| 查看次数: |
586 次 |
| 最近记录: |