From: Ryan Victory Date: 2013-02-16T01:46:09+09:00 Subject: Re: [from BASIC to Ruby] so, what's the proper way to replace funcionality of GOTO ? Love U Ruby: I'm really not sure what you meant by that response, but it's irrelevant and inaccurate (there is no catch in Ruby, it's rescue)... To answer the OP's question, you'd probably want to first pick up a good book on Ruby (or one of the many tutorials online). You're probably going to want to look into first creating methods where you normally had headers in your BASIC code and replacing the GOTO declarations with just the method name. I'd also take a look at the "case...when" syntax to replace your if statements. Switching to an object oriented language from BASIC is tough but not impossible, especially if you're just replacing some utility scripts. I'm sure there's a "menu" gem out there too somewhere. Hopefully that cleared up at least something, Ryan Victory On 2/15/13 10:37 AM, Love U Ruby wrote: > Stu P. D'naim wrote in post #1097111: >> I need to make few scripts for tasks I do often manually, but last time >> I programmed something was almost 20 years ago in high school, we used >> some BASIC dialect. Since no one uses BASIC nowdays, I decided to give a >> try to Ruby (I also tried Python, but it's strict indentation is driving >> me insane). >> >> I watched Ruby Essentials Video from Lynda.com (twice), and I pretty >> much understand almost all of it, but still, I'm having trouble to adapt >> how to structure my programs (without using of GOTO) >> >> >> Here's a simple example written in FreeBASIC (it works) >> --------------------------------------------------------------------- >> Dim As Integer strKeyPres > > Yes, It has. You can try "catch - throw" in Ruby's world. > > Thanks >