From: "Brian F. Feldman" Date: 2000-12-21T21:51:43+09:00 Subject: [ruby-talk:7858] Re: Next amusing problem: talking integers (was Re: Code sample for improvement) "Brian F. Feldman" wrote: > #!/usr/local/bin/ruby > module NumReader > module English > NEGATIVE = "negative" > n = %w(zero one two three four five six seven eight nine > ten eleven twelve thirteen) > NUMBERS = n + > (4 .. 9).collect {|num| n[num] + "teen"} > TENS = [nil, nil] + %w(twenty thirty forty fifty sixty seventy eighty > ninety) > HUNDRED = "hundred" > ORDERS_OF_3 = [""] + %w(thousand million billion trillion zillion ---^--- I don't know how that cropped up in there... if you remove it, the program works a bit better ;) -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------'