Just To You, :-) Symbol , a sign with some meaning in nature language. eg, #% = percent, #$ = dollar. but 2. '$%%&' asSymbol >>>> no meaning
symbol as a message should have his meaning. defined in its method. a message should let programmer know what to do. I come from China , My English is poor. Cheers. Bing 在 2017-02-13 07:26:05,"john pfersich" <jpfers...@gmail.com> 写道: BUT There are not compliant below 1. ' ' asSymbol >>>> no meaning 2. '$%%&' asSymbol >>>> no meaning 3. 'sign' asSymbol = 'sign ' asSymbol >>> false because of space. 3. ' one two three ' asSymbol >>> I think It should become three symbols = #one, #two, #three I don't know what you mean by "no meaning', they're symbols. Try this in a Playground, it works in Pharo 5" | oc sym filtered| oc := ' one two three $%%&' splitOn: ' '. sym := OrderedCollection new. oc do: [:each | sym add: each asSymbol]. filtered := OrderedCollection new. filtered := sym select: [ :each | each ~= #'' ]. Transcript show: sym printString; cr. Transcript show: filtered printString; cr. On Fri, Feb 10, 2017 at 8:56 PM, lb <liangbin...@126.com> wrote: Hi, I know Symbol is subclass of String. Any string object can become symbol object by sending 'asSymbol' message.. I think symbol must has its meaning in comon use, so the symbol should be composed of alphabet or number ‘without space“. BUT There are not compliant below 1. ' ' asSymbol >>>> no meaning 2. '$%%&' asSymbol >>>> no meaning 3. 'sign' asSymbol = 'sign ' asSymbol >>> false because of space. 3. ' one two three ' asSymbol >>> I think It should become three symbols = #one, #two, #three Mybe my understanding is wrong. Bing Liang