Michael Malone
3/3/2009 9:49:00 PM
Pascal J. Bourguignon wrote:
> Guy Dols <guy_dols@hotmail.com> writes:
>
>
>> hy
>>
>> i am new to ruby i am trieng to get some skils but i have a problem when
>> i use a fixnum :
>>
>> years = ask("")
>> days = years * 365
>> puts days
>>
>>
>> my answer is
>> 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
>>
>> but i should be 730
>>
>
>
> I think you are lying. Twice.
>
> First, the answer is probably not what you're telling but rather:
>
> 22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
>
> Then it should NOT be 730, but what you get.
>
> This is because for all we know, ask("") is returning "2" and 365
> times "2" is a string containing 365 2s. At least in such a inferior
> language as Ruby.
>
>
Unsuccessful troll is unsuccessful.
>
> In more strongly typed programming languages such as Common Lisp,
> you'd get an error:
>
> C/USER[929]> (* "2" 365)
>
> *** - *: "2" is not a number
>
>
>
>
>> i have an screenshot as an attachment plz help me
>>
>
> Good for you!
>
>
>
=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================