Numberformat

william humphrey shoreagent at gmail.com
Tue Aug 26 15:51:33 EDT 2008


I don't get it. Why not just say put "0" & "1" into
text-string-with-zero-in-the-front.

Why would adding a zero do that?

On Tue, Aug 26, 2008 at 3:48 PM, Mark Schonewille <
m.schonewille at economy-x-talk.com> wrote:

> Hi David,
>
> I tried the following script:
>
> on mouseUp
>   beep
>   put 1,8 into someDate
>   set the numberformat to "00.######"
>   put item 1 of someDate + 0 into y
>   put item 2 of someDate + 0 into someMonth
>   put y & cr & someMonth
> end mouseUp
>
> which gives me
>
> 01
> 08
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> http://economy-x-talk.com
> http://www.salery.biz
> http://facebook.economy-x-talk.com
>
> Benefit from our inexpensive hosting services. See
> http://economy-x-talk.com/server.html for more info.
>
>
> On 26 aug 2008, at 21:31, David Bovill wrote:
>
>  I can never get this working... or has something changed? I want a number
>> formatted to 2 chars and padded with leading zeros if it is only 1 digit.
>> I
>> thought numberformat did this (for containers as well as fields by forcing
>> a
>> calculation by adding zero. So:
>>
>>   set the numberformat to "00.######"
>>   put item 1 of someDate + 0 into y
>>   put item 2 of someDate + 0 into someMonth
>>
>> Well its not working now. I get "8" instead of "08" for this month?
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
http://www.bluewatermaritime.com



More information about the use-livecode mailing list