From: Robert Klemme Date: 2012-06-06T18:13:42+09:00 Subject: Re: convert delphi codes to ruby On Wed, Jun 6, 2012 at 10:57 AM, RR TT wrote: > Thanks Robert, am very new to Ruby and learning the way around to work > with it. In fact I got these delphi codes from a friend, and wanted to > try them out to see how to write them in Ruby instead. Well, of course you can translate the original functions mechanically, although I would not recommend it. Replace "function" with "def", remove "begin" and variable declarations and replace ":=" with "=". Also note that indexes start at 0 in Ruby and not 1 as apparently in Delphi. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/