String question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

String question

Jim O'Brien
Why does the x := 'Transcript show: 'abc'.'. yield x := 'Transcript show: 'abc Nothing more expected ->'.'. ?





_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: String question

Joseph Alotta
I think you are using the period as a join operator.  The join operator is a comma.



> On Dec 28, 2016, at 4:26 PM, obrienj [via Smalltalk] <[hidden email]> wrote:
>
> Why does the x := 'Transcript show: 'abc'.'. yield x := 'Transcript show: 'abc Nothing more expected ->'.'. ?
>
>
>
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://forum.world.st/String-question-tp4928334.html
> To start a new topic under Squeak - Beginners, email [hidden email]
> To unsubscribe from Squeak - Beginners, click here.
> NAML

Reply | Threaded
Open this post in threaded view
|

Re: String question

Jim O'Brien
I'm not trying to join anything. I want to put Transcript show: 'abc'. (including the period) into string x.

A simpler example: x := 'abc.'. puts abc. into x, so why doesn't x := ''abc'.' put 'abc.' into x (the single quotes are part of the string)?



-------- Original Message --------





-------- Original Message --------
Subject: Re: [Newbies] String question
Local Time: December 28, 2016 3:49 PM
UTC Time: December 28, 2016 11:49 PM

I think you are using the period as a join operator.  The join operator is a comma.



> On Dec 28, 2016, at 4:26 PM, obrienj [via Smalltalk] <[hidden email]> wrote:
>
> Why does the x := 'Transcript show: 'abc'.'. yield x := 'Transcript show: 'abc Nothing more expected ->'.'. ?
>
>
>
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
>
>
> If you reply to this email, your message will be added to the discussion below:
> To start a new topic under Squeak - Beginners, email [hidden email]
> To unsubscribe from Squeak - Beginners, click here.
> NAML



View this message in context:Re: String question
Sent from the Squeak - Beginners mailing list archive at Nabble.com.


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: String question

Joseph Alotta
I see.

You are looking to find the escape sequence.

I tried   x := ‘Transcript show: \’abc\’.’.

But that doesn’t work.

I’m only a beginner myself.  I wonder where the others are in this group?


Sincerely,

Joseph.




> On Dec 28, 2016, at 10:42 PM, obrienj [via Smalltalk] <[hidden email]> wrote:
>
> I'm not trying to join anything. I want to put Transcript show: 'abc'. (including the period) into string x.
>
> A simpler example: x := 'abc.'. puts abc. into x, so why doesn't x := ''abc'.' put 'abc.' into x (the single quotes are part of the string)?
>
>
>
> -------- Original Message --------
>
>
>
>
>
>> -------- Original Message --------
>> Subject: Re: [Newbies] String question
>> Local Time: December 28, 2016 3:49 PM
>> UTC Time: December 28, 2016 11:49 PM
>> From: [hidden email]
>> To: [hidden email]
>>
>> I think you are using the period as a join operator.  The join operator is a comma.
>>
>>
>>
>> > On Dec 28, 2016, at 4:26 PM, obrienj [via Smalltalk] <[hidden email]> wrote:
>> >
>> > Why does the x := 'Transcript show: 'abc'.'. yield x := 'Transcript show: 'abc Nothing more expected ->'.'. ?
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Beginners mailing list
>> > [hidden email]
>> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
>> >
>> >
>> > If you reply to this email, your message will be added to the discussion below:
>> > http://forum.world.st/String-question-tp4928334.html
>> > To start a new topic under Squeak - Beginners, email [hidden email]
>> > To unsubscribe from Squeak - Beginners, click here.
>> > NAML
>>
>>
>> View this message in context:Re: String question
>> Sent from the Squeak - Beginners mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://forum.world.st/String-question-tp4928334p4928343.html
> To start a new topic under Squeak - Beginners, email [hidden email]
> To unsubscribe from Squeak - Beginners, click here.
> NAML

Reply | Threaded
Open this post in threaded view
|

Re: String question

Tobias Pape

On 29.12.2016, at 06:39, Joseph Alotta <[hidden email]> wrote:

> I see.
>
> You are looking to find the escape sequence.
>
> I tried   x := ‘Transcript show: \’abc\’.’.
>

you have to double the quotes:

x := 'Transcript show: ''abc''.'

Best regards
        -Tobias

> But that doesn’t work.
>
> I’m only a beginner myself.  I wonder where the others are in this group?
>
>
> Sincerely,
>
> Joseph.
>
>
>
>
> > On Dec 28, 2016, at 10:42 PM, obrienj [via Smalltalk] <[hidden email]> wrote:
> >
> > I'm not trying to join anything. I want to put Transcript show: 'abc'. (including the period) into string x.
> >
> > A simpler example: x := 'abc.'. puts abc. into x, so why doesn't x := ''abc'.' put 'abc.' into x (the single quotes are part of the string)?
> >
> >
> >
> > -------- Original Message --------
> >
> >
> >
> >
> >
> >> -------- Original Message --------
> >> Subject: Re: [Newbies] String question
> >> Local Time: December 28, 2016 3:49 PM
> >> UTC Time: December 28, 2016 11:49 PM
> >> From: [hidden email]
> >> To: [hidden email]
> >>
> >> I think you are using the period as a join operator.  The join operator is a comma.
> >>
> >>
> >>
> >> > On Dec 28, 2016, at 4:26 PM, obrienj [via Smalltalk] <[hidden email]> wrote:
> >> >
> >> > Why does the x := 'Transcript show: 'abc'.'. yield x := 'Transcript show: 'abc Nothing more expected ->'.'. ?
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > Beginners mailing list
> >> > [hidden email]
> >> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> >> >
> >> >
> >> > If you reply to this email, your message will be added to the discussion below:
> >> > http://forum.world.st/String-question-tp4928334.html
> >> > To start a new topic under Squeak - Beginners, email [hidden email]
> >> > To unsubscribe from Squeak - Beginners, click here.
> >> > NAML
> >>
> >>
> >> View this message in context:Re: String question
> >> Sent from the Squeak - Beginners mailing list archive at Nabble.com.
> >
> >
> > _______________________________________________
> > Beginners mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> >
> >
> > If you reply to this email, your message will be added to the discussion below:
> > http://forum.world.st/String-question-tp4928334p4928343.html
> > To start a new topic under Squeak - Beginners, email [hidden email]
> > To unsubscribe from Squeak - Beginners, click here.
> > NAML
>
>
> View this message in context: Re: String question
> Sent from the Squeak - Beginners mailing list archive at Nabble.com.
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners