Negative Numbers and NumberFormat

Bob Sneidar bobsneidar at iotecdigital.com
Wed Apr 5 14:18:27 EDT 2017


That was my point, that the sign should not take up one of the digits in numberformat 00. And thank you for your explanation about strings being strings until math was done on them. In my timeCalc() function however, I already convery everything to seconds and just before conatenating HH, MM and SS, I add 0 to each one. 

set the numberformat to "00"
return tTotalHours +0 & ":" & tTotalMinutes +0 & ":" & tTotalSeconds +0

If tTotalHours is negative I get -H if it is less than 10. Like I said it's not a big deal. I can always work around it. 

Bob S


> On Apr 5, 2017, at 10:21 , Mark Waddingham via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> It looks odd, but is explainable. It has nothing to do with '-' eating up
> places for 0 in the numberFormat, but to do with the type of things in
> that expression:





More information about the use-livecode mailing list