Hal Fulton wrote:
> Ken Kam wrote:
>> while a[0] < 100...
>> 
>> which works... but is there a better way of doing it?
> 
> These should all work:
> 
>    a, = scanf('%d')
>    a,* = scanf('%d')    # Prettier
>    a = *scanf('%d')     # Clearer?
> 
> However, if you really just want to convert a single
> string to an integer, use str.to_i or Integer(str).
> 
> 
> Hal

Hmmm... the * thing...
is it possible if you explain that in a bit more detail? Is that like 
pointers in C?


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