incrementing a decimal...

Monte Goulding monte at appisle.net
Tue Nov 7 19:49:18 EST 2017


> On 8 Nov 2017, at 11:45 am, Monte Goulding via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Something like:
> 
> put “3.33.007" into tValue
> set the itemDelimiter to "."
> put format("%s.%03d", item 1 to 2 of tValue, item 3 of tValue + 1) into tNextValue

Actually probably simpler than that is:

put “3.33.007" into tValue
set the itemDelimiter to "."
put item 1 of tValue & “.” & item 2 to 3 of tValue + 0.001 into tNextValue



More information about the use-livecode mailing list