Hello everybody i am a new ruby user and i learn best by doing. so i am
trying to code what i would imagine to be a better tool tracjing system
for y work. right now i am trying to figure out how to get a number to
pull up a name. The various way's i have tried to do this is:
On Wed, Mar 6, 2013 at 3:04 PM, Andrew l. <lists@ruby-forum.com> wrote:
Hello everybody i am a new ruby user and i learn best by doing. so i am
trying to code what i would imagine to be a better tool tracjing system
for y work. right now i am trying to figure out how to get a number to
pull up a name. The various way's i have tried to do this is:
No language I'm currently familiar with allows you to assign one
literal to another.
44523 is not a variable, it is a literal FixNum in Ruby, and a literal
of some kind of integer in other languages.
···
On Wed, Mar 6, 2013 at 2:04 PM, Andrew l. <lists@ruby-forum.com> wrote:
Hello everybody i am a new ruby user and i learn best by doing. so i am
trying to code what i would imagine to be a better tool tracjing system
for y work. right now i am trying to figure out how to get a number to
pull up a name. The various way's i have tried to do this is:
So you cannot convert 44523 or any other umber into an array or hash or
anything that changes that value into something that can have something
assigned to it?
So you cannot convert 44523 or any other umber into an array or hash or
anything that changes that value into something that can have something
assigned to it?
Of course you can use an integer as a key to a hash:
irb(main):001:0> h={}
=> {}
irb(main):002:0> h[44523]='a string'
=> "a string"
irb(main):003:0> h[71234]='another string'
=> "another string"
irb(main):004:0> h
=> {44523=>"a string", 71234=>"another string"}
irb(main):005:0> h[44523]
=> "a string"
Carlo
···
Subject: Re: Numbers and groups.
Date: gio 07 mar 13 03:45:56 +0900
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)