for loop

34 views
Skip to first unread message

Rodrigo Herefeld

unread,
Feb 27, 2013, 9:46:34 AM2/27/13
to mi...@googlegroups.com
How do i do a for loop in mirah?
In jruby the code:

for i in (0..5) do
puts i
end

works well, but in mirah its not working....

--
Rodrigo Cesar Herefeld

Dave Newton

unread,
Feb 27, 2013, 9:53:33 AM2/27/13
to mi...@googlegroups.com
Did you try `each`?


--
You received this message because you are subscribed to the Google Groups "The Mirah Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirah+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Brendan Ribera

unread,
Feb 27, 2013, 12:30:59 PM2/27/13
to mi...@googlegroups.com
You can also use:

5.times do |i|
  puts i
end
Reply all
Reply to author
Forward
0 new messages