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

List:       ruby-talk
Subject:    Re: Got stuck...
From:       Emmanuel Touzery <emmanuel.touzery () wanadoo ! fr>
Date:       2004-08-20 9:22:33
Message-ID: 4125C335.5080209 () wanadoo ! fr
[Download RAW message or body]

Meino Christian Cramer wrote:

>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...
>  
>
didn't read it all, but imho ruby wants to read:

 print(val + ?A).chr," "

but you want to write:

print((val + ?A).chr," ")

or sth like that. put explicit brackets in that case.

emmanuel


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

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