in reply to RE: RE: RE: RE: (Ovid) Re: General quesion
in thread General quesion

Hmm. I'm not sure what you mean but I think you have made an incorrect assumption. Perl's int() just rounds down. It does not (necessarilly) convert the number into a long or unsigned long. You might want to read my previous node on Perl and floating point.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
RE: RE: RE: RE: RE: RE: (Ovid) Re: General quesion
by KM (Priest) on Aug 08, 2000 at 23:32 UTC
    No wrong assumption here. I said int() get's the integer portion of the number, which echoes the FAQ:

    # perldoc -f int
    =item int EXPR
    
    =item int
    
    Returns the integer portion of EXPR. etc...
    
    Reread my post, I make no mention of int() rounding. And you are incorrect, Perl's int() doesn't round down, it simply gives you the integer portion.
    # perl -wle 'print int(1.66)'

    But, I do see where my wording may have been confuzzling, so I changed it a little.

    Cheers,
    KM

      Yes it does automatically round the number down (which is simply taking the integer portion)

      Perl's int() doesn't round down, it simply gives you the integer portion

      Um, you might want to make up your mind on what "rounding down" means. :)

              - tye (but my friends call me "Tye")
        My mind is foggy, so my clarity is not here today :) I made it (hopefully) more clear ;)

        Cheers,
        KM