On 13 February 2017 at 13:48, lb <liangbin...@126.com> wrote:

> 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.
>

Hmm.. Then why it is so hard for you to comprehend such simple concept?
In Chinese you have thousands unique glyphs,
that you can use for writing, and each one has own meaning. Sometimes they
literally mean something,
but sometimes the meaning depends on context.
That means that symbols '@#&%@#$' may not have meaning for most uses,
while for some other can. This depends on context.

Now if you take into account that in English, there's not so many glyphs
for letter,
so you have to use combination(s) of them to form words, phrases etc.. that
could have meaning
in specific context, while not have in other.


>
>
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
>>
>>
>>
>


-- 
Best regards,
Igor Stasenko.

Reply via email to