Fun with nummberFormat

Ken Ray kray at sonsothunder.com
Thu Feb 16 01:18:35 EST 2012


On Feb 14, 2012, at 5:28 PM, Terry Judd wrote:

> On 15/02/2012, at 09:07 AM, Bob Sneidar wrote:
> 
> Yes I know. I was remarking that you can put virtually anything in the numberFormat and it will pad with zero's.
> 
> And all that time I've been 'manually' padding my values. No more!

I've been using the "format" function instead:

  put format("%04d","13")
  -->  0013

  put format("%08d","121")
  --> 00000121

That's what I love about LiveCode… you can do the same thing in multiple ways...

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/	




More information about the use-livecode mailing list