From: "Michael W. Ryder" <_mwryder@...> Date: 2007-05-05T04:00:12+09:00 Subject: Re: Question regarding tr method in Strings Class Rick DeNatale wrote: > On 5/3/07, Michael W. Ryder <_mwryder@worldnet.att.net> wrote: > > >> In some ways Ruby is far easier to use than the language I have been >> using for over 25 years, but there are other places it is much harder. > > Just out of curiosity, what language is that, and how does it make > this particular operation much easier than Ruby does? > I have been using Business Basic professionally for over 25 years after learning Fortran and Basic in college. String handling is much easier in Ruby once I get past the small differences, but in screen displays, file handling, and exception handling Ruby is not even on the horizon. These are all built into the language and are very easy to use. As an example, that I am working on in another thread, to print $12,345.67 in Business Basic in the middle of a screen I enter 'Print @(20,20),A:"$##,###,##0.00". This same statement can handle any amount from 1 cent to 99 million dollars and will keep the decimal point lined up for amounts above and below that line. For this thread, Ruby is much better as in Business Basic I have to find the position of a character, replace it or remove it, and repeat. In Ruby this can all be done with one tr or gsub call.