Forum: Ruby on Rails what the » ???

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3d1dc744a3cc39348fbe49c6f5385a94?d=identicon&s=25 Bobby (Guest)
on 2006-03-13 20:45
Im just learning trough the "geting started with ruby"
i'm only on page Ruby.new and im stuck
here's the thing, I'm using FreeRIDE to duplicate the examples

a = %w{ ant bee cat dog elk }
a[0] 	» 	"ant"
a[3] 	» 	"dog"

for the live of me i cant seem to use Alt+0187 (»)
what happen??
2c80e1b0837eec76d38d4f7fa1c15e87?d=identicon&s=25 Michael Gorsuch (Guest)
on 2006-03-13 20:58
(Received via mailing list)
I believe this is just showing you what data is stored in which slot in
the
array.

a[0] contains "ant", etc.
3d1dc744a3cc39348fbe49c6f5385a94?d=identicon&s=25 Bobby (Guest)
on 2006-03-13 21:03
Michael Gorsuch wrote:
> I believe this is just showing you what data is stored in which slot in
> the
> array.
>
> a[0] contains "ant", etc.

mmm sorry for the misunderstanding
but what I meant is, why cant I enter [ » ] with the FreeRIDE
I tried pressing Alt+0187 in my keyboard and nothing happen
8cda9a20510e17947e91d6f24b073577?d=identicon&s=25 Jim McFarland (Guest)
on 2006-03-13 21:04
(Received via mailing list)
You don't need to actually type in the "»".  In the code, that
convention is used to show you the output/value of the expression on
the left.
3d1dc744a3cc39348fbe49c6f5385a94?d=identicon&s=25 Bobby (Guest)
on 2006-03-13 21:09
Jim McFarland wrote:
> You don't need to actually type in the "�".  In the code, that
> convention is used to show you the output/value of the expression on
> the left.
Thank you for helping me but please bear with me for a moment :)
could you give me an example?
8cda9a20510e17947e91d6f24b073577?d=identicon&s=25 Jim McFarland (Guest)
on 2006-03-13 21:23
(Received via mailing list)
This might explain it better than me:

http://www.rubycentral.com/book/preface.html

Go there and read the section on "Notation Conventions".
8cda9a20510e17947e91d6f24b073577?d=identicon&s=25 Jim McFarland (Guest)
on 2006-03-13 21:26
(Received via mailing list)
On 3/13/06, Bobby <damienov@gmail.com> wrote:
> Michael Gorsuch wrote:
> > I believe this is just showing you what data is stored in which slot in
> > the
> > array.
> >
> > a[0] contains "ant", etc.
>
> mmm sorry for the misunderstanding
> but what I meant is, why cant I enter [ » ] with the FreeRIDE
> I tried pressing Alt+0187 in my keyboard and nothing happen

You don't need to enter that character.  That character and anything
after it is not part of the actual sample code.
3d1dc744a3cc39348fbe49c6f5385a94?d=identicon&s=25 Bobby (Guest)
on 2006-03-13 21:27
Jim McFarland wrote:
> This might explain it better than me:
>
> http://www.rubycentral.com/book/preface.html
>
> Go there and read the section on "Notation Conventions".
So the » is just a sample of the output?
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (Guest)
on 2006-03-13 21:51
(Received via mailing list)
a[0]    »       "ant"
a[3]    »       "dog"

is equivalent to "reading"

a[0] has a value of "ant"
a[3] has a value of "dog"

it's strictly there for visualization purposes and has not meaning
outside
that context, ie, it's not code.
3d1dc744a3cc39348fbe49c6f5385a94?d=identicon&s=25 Bobby (Guest)
on 2006-03-13 21:59
Chris Hall wrote:
> a[0]    »       "ant"
> a[3]    »       "dog"
>
> is equivalent to "reading"
>
> a[0] has a value of "ant"
> a[3] has a value of "dog"
>
> it's strictly there for visualization purposes and has not meaning
> outside
> that context, ie, it's not code.
Ahh I see
Thank you all for your help :)
This topic is locked and can not be replied to.