Compare numeric strings with leading zeros

dunbarx at aol.com dunbarx at aol.com
Wed Sep 2 22:52:45 EDT 2015


Hi.


Not sure what test values fit your needs, but does this help?



function noZeros arg1.arg2
if the length of arg1 <> the length of arg2 and arg1 = arg2  then return "false" else return "true"
end noZero



This sidesteps several issues, but may not address, as I mentioned above, all your needs. But it will work with similar numbers that only differ by the number of leading zeros.



Craig Newman



-----Original Message-----
From: Ralph DiMola <rdimola at evergreeninfo.net>
To: 'How to use LiveCode' <use-livecode at lists.runrev.com>
Sent: Wed, Sep 2, 2015 10:32 pm
Subject: Compare numeric strings with leading zeros


Feeling pretty clueless here but...

I need ("5" = "005") to be false. This is
for password validation.

Ralph DiMola
IT Director
Evergreen Information
Services
rdimola at evergreeninfo.net



_______________________________________________
use-livecode
mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe,
unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the use-livecode mailing list