Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!talisker.lacave.net!lacave.net!not-for-mail From: Daniel Johnson Newsgroups: comp.lang.ruby Subject: For loops trouble Date: Sat, 16 Apr 2011 13:27:51 -0500 Organization: Service de news de lacave.net Lines: 10 Message-ID: <020937ce0d7f4e0fc8a6590932f71e15@ruby-forum.com> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1302978651 87999 65.111.164.187 (16 Apr 2011 18:30:51 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Sat, 16 Apr 2011 18:30:51 +0000 (UTC) X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 381710 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <020937ce0d7f4e0fc8a6590932f71e15@ruby-forum.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3019 I am trying to translate a program I have in Java into ruby and having trouble translating this for loop for(int i = 0; a[i] < x;i++) I tried this for i in a[i]...x but it produce some errors. Any help will be appreciated. Thank you. -- Posted via http://www.ruby-forum.com/.