[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: what on earth..? equivalence (==) not working
- From: Mildred <ml.mildred593@...>
- Date: Wed, 17 May 2006 07:09:47 +0200
On Wed, 17 May 2006 16:55:18 +1200 Damian Stewart wrote:
> David Morris-Oliveros wrote:
> > What about the types?
> > Does 235 == '235' ?
> aah. it seems id is a string but arm_id is a number.
> i thought lua converted automagically between the two types..?
Not evrywhere ... Just when you clearly want a string (cancatenation).
And it's better like that, or else lua would need the operator === like
you can always convert string to numbers with tonumber() and number to
string with tostring().
Mildred <xmpp:email@example.com> <http://mildred632.free.fr/>
Clef GPG : <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]