Compare numeric strings with leading zeros

Ralph DiMola rdimolad at evergreeninfo.net
Thu Sep 3 06:16:03 CEST 2015


Thanks all. The length test or putting an alpha char before both seems like the easiest.  I was hoping there was another more elegant way. This makes me rethink my LC habits in a big way. I was hoping that there was a way to coerce "005" into a string of 3 chars.

Thanks again! !


Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net
Office: 518-636-3998 ex:11
Cell: 518-636-3998



<div>-------- Original message --------</div><div>From: Colin Holgate <colinholgate at gmail.com> </div><div>Date:09/02/2015  23:49  (GMT-05:00) </div><div>To: How to use LiveCode <use-livecode at lists.runrev.com> </div><div>Subject: Re: Compare numeric strings with leading zeros </div><div>
</div>Is there ever a case where this would return true?:

put "005" into a
put "5" into b
answer a = b and length(a) = length(b)


_______________________________________________
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