MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: [1.8.0beta2] tiny little bug
In article <v02130538ad466dbf2908@[194.109.20.133]>,
Kai Storbeck <kais@dds.nl> wrote:
>
>;tonum(" - 3.9")
>=> 0
>
>Can the behaviour be changed?
>
It isn't a bug. -3.9 is not an integer constant:
;tonum("3.9")
=> 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
-hpa
--
PGP public key available - finger hpa@terminus.storm.net
"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-
References:
Home |
Subject Index |
Thread Index