MOO-cows Mailing List Archive


Re: [1.8.0beta2] tiny little bug

In article <v02130538ad466dbf2908@[]>,
Kai Storbeck <> wrote:
>;tonum(" - 3.9")
>=> 0
>Can the behaviour be changed?

It isn't a bug.  -3.9 is not an integer constant:

=> 0

Remember tonum() is an alias for toint().  For backward compatibility
it is necessary to retain this behaiour.   What you want to do is one of:

; tofloat(" - 3.9");
=> -3.9

; toint(tofloat(" - 3.9"))
=> -3


PGP public key available - finger
"The earth is but one country, and mankind its citizens."  --  Bahá'u'lláh
GE/CS 3.1 d- s-:- a- C++++ ULIS++++$ P+++ L++++>+++++ E++ W++ N++ o+ K
w--- O@ M V- PGP+ t+ 5++ X? R@ tv- b++ DI++++ D++(+) G e++ h- r-- y-


Home | Subject Index | Thread Index