[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: Got stuck...
From: "Neil Mc Laughlin" <nml () fjserv ! net>
Date: 2004-08-20 9:32:19
Message-ID: 001501c48698$58922420$035efa0a () icl ! net
[Download RAW message or body]
I think you need to be a wee bit more explicit about what you want to print.
What about something like this?
etwdata.each{ |rot|
rot.each{ |val|
print("%s\n" % [(val + ?A).chr])
}
}
----- Original Message -----
From: "Meino Christian Cramer" <Meino.Cramer@gmx.de>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Friday, August 20, 2004 10:18 AM
Subject: Got stuck...
> Hi,
>
> may be my Enigma hacking has encyphered my brain also...but...
>
> What is wrong with this code:
>
> 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
>
>
> Sorry... but _I_ dont see anything wrong here...
>
> Ruby.use!
> Meino
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic