[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Got stuck...
From:       "Mehr, Assaph (Assaph)" <assaph () avaya ! com>
Date:       2004-08-20 9:25:41
Message-ID: 338366A6D2E2CA4C9DAEAE652E12A1DE01D593E5 () au3010avexu1 ! global ! avaya ! com
[Download RAW message or body]

 
> etwdata=[[1,2],[3,4],[5,6]]         # only example data

> etwdata.each{ |rot|
> rot.each{ |val|
>   print (val + ?A).chr," "          # here ruby fails...error message
below...
> }
> print "\n" 

> Ruby's error message:

> basicenigma4.rb:175: warning: don't put space before argument
parentheses

Listen to the warning :)

c:\>ruby
etwdata=[[1,2],[3,4],[5,6]]
etwdata.each{ |rot| rot.each { |val| print( (val + ?A).chr, "") } }
puts
^Z

BCDEFG


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic