On Wed, Dec 1, 2010 at 8:30 PM, Mike Stephens <rubfor / recitel.net> wrote:
> If you've ever read "Real Programmers don't use Pascal" (see
> http://www.codeproject.com/KB/scrapbook/realprog.aspx ) you'll know that
> "Determined Real Programemrs can write Fortran programs in any language"
> Just because you're a Ruby programmer you don't have to use all that OO
> stuff.

How can you use ruby without "all that OO stuff"? That's one of the
main attractions.


> def initialise_globals
> $m1 = "JANUARY"
> $m2 = "FEBRUARY"
> $m3 = "MARCH"
>
> $m1_index = 0
> $m2_index = 0
> $m3_index = 0
> end

Globals? Why? Constants are your friends. These values are already
part of the Date class.

require 'date'
>> Date::MONTHNAMES
[ nil, "January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December" ]


> def get_array
> $input_array = ["#<Event:0x4d4cf78>", "#<Event:0x4d4d470>", "MARCH",
> "#<Event:0x4d4dc08>",
> "#<Event:0x4d4e100>", "FEBRUARY", "#<Event:0x4d4e898>","JANUARY"]
> puts " #{$input_array}"
> end

This doesn't do whatever you think it does.

I guess determined programmers can write VB programs in any language.

Regards,
Ammar