equal
deleted
inserted
replaced
4879 ! |
4879 ! |
4880 |
4880 |
4881 numArgs |
4881 numArgs |
4882 "treating the receiver as a message selector, return how many arguments would it take" |
4882 "treating the receiver as a message selector, return how many arguments would it take" |
4883 |
4883 |
4884 |binopChars firstChar| |
4884 |binopChars| |
4885 |
4885 |
4886 (self size > 2) ifFalse:[ |
4886 (self size <= Scanner maxBinarySelectorSize) ifTrue:[ |
4887 binopChars := Scanner binarySelectorCharacters. |
4887 binopChars := Scanner binarySelectorCharacters. |
4888 firstChar := self at:1. |
4888 (self contains:[:someChar | (binopChars includes:someChar) not]) ifFalse:[ |
4889 |
4889 ^ 1 |
4890 (self size == 1) ifTrue:[ |
4890 ]. |
4891 (binopChars includes:firstChar) ifFalse:[^ 0]. |
|
4892 ^ 1 |
|
4893 ]. |
|
4894 (binopChars includes:firstChar) ifTrue:[ |
|
4895 (binopChars includes:(self at:2)) ifTrue:[^ 1] |
|
4896 ] |
|
4897 ]. |
4891 ]. |
4898 ^ self occurrencesOf:$: |
4892 ^ self occurrencesOf:$: |
4899 |
4893 |
4900 " |
4894 " |
4901 'foo:bar:' numArgs |
4895 'foo:bar:' numArgs |
4902 #foo:bar: numArgs |
4896 #foo:bar: numArgs |
4903 'hello' numArgs |
4897 'hello' numArgs |
4904 '+' numArgs |
4898 '+' numArgs |
4905 '|' numArgs |
4899 '++' numArgs |
4906 '?' numArgs |
4900 '+++' numArgs |
|
4901 '|' numArgs |
|
4902 '?' numArgs |
|
4903 '_' numArgs |
|
4904 '_:' numArgs |
|
4905 '_:_:' numArgs |
|
4906 '<->' numArgs |
4907 " |
4907 " |
4908 |
4908 |
4909 "Modified: 4.1.1997 / 14:16:14 / cg" |
4909 "Modified: 4.1.1997 / 14:16:14 / cg" |
4910 ! |
4910 ! |
4911 |
4911 |
5029 ! ! |
5029 ! ! |
5030 |
5030 |
5031 !CharacterArray class methodsFor:'documentation'! |
5031 !CharacterArray class methodsFor:'documentation'! |
5032 |
5032 |
5033 version |
5033 version |
5034 ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.326 2005-12-15 21:40:42 cg Exp $' |
5034 ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.327 2005-12-21 17:00:25 cg Exp $' |
5035 ! ! |
5035 ! ! |
5036 |
5036 |
5037 CharacterArray initialize! |
5037 CharacterArray initialize! |