Harry Kakueki wrote:
> On 6/12/07, Joop Van den tillaart <tillaart36 / hotmail.com> wrote:
>>
>> 1. first of all is there a way to somehow automatically generate an
>> array of following numbers or other characters because when I later on
>> plan to change the gridsize it would be nice if this can be filled
>> automatically...
>>
> 
> Hi,
> 
> If you want to use one array like in your example, you can fill it
> using a range.
> 
> http://www.rubycentral.com/book/tut_stdtypes.html#S3
> 
> grid = (1..196).to_a
> p grid
> 
> Is that what you want to do?
> 
> But you may want to use a 2D array.
> 
> Harry

Hey man, thanks for replying...okay so I already learned something...

grid = (1..196).to_a
p grid

And I studied some other thread:

http://www.ruby-forum.com/topic/67248#83349

I typed over (sometimes I type over because I think it's better to 
understand that way) one of the last scripts and it lets me have control 
to print particular cells of an excel like sheet...

Maybe it is easier for my project to make a grid like: A1 - A14, B1 - 
B14...N1 - N14) so the horizontal rows of the grid are alphabetical and 
the columns numeric...Is this really an array and can I after generating 
it alter it in some way...

For example...i run that script...and after that can I say the cells 
A14, B14, C14, .. , M14, N14 (the most right column) have to be 
characterized as a road?

Man I'm way to new to this I think I need a long time to learn.. :(

If anyone can be of help it would be higly appreciated...

-- 
Posted via http://www.ruby-forum.com/.