Re: incrementing a decimal...
Monte Goulding's solution was what I was after. Thank you. -- Nicolas Cueto On 8 November 2017 at 09:45, Monte Goulding via use-livecode < use-livecode@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 > > > On 8 Nov 2017, at 11:22 am, Nicolas Cueto via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > I'm after an easy way to convert span 3.33.007-3.33.012 into this > > incremental cr-del list: > > > > 3.33.007 > > 3.33.008 > > 3.33.009 > > 3.33.010 > > 3.33.011 > > 3.33.012 > > > > From experience, I know if I add 1 to "07" the result is "8" and not > "08". > > > > Thank you. > > > > -- > > Nicolas > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: incrementing a decimal...
put 33.000 into x put 34.123 into y put 0.001 into stp repeat with i=x to y-stp/2 step stp put format("3.%.3f",i) & cr after lst end repeat ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: incrementing a decimal...
> On 8 Nov 2017, at 11:45 am, Monte Goulding via use-livecode >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 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: incrementing a decimal...
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 > On 8 Nov 2017, at 11:22 am, Nicolas Cueto via use-livecode >wrote: > > I'm after an easy way to convert span 3.33.007-3.33.012 into this > incremental cr-del list: > > 3.33.007 > 3.33.008 > 3.33.009 > 3.33.010 > 3.33.011 > 3.33.012 > > From experience, I know if I add 1 to "07" the result is "8" and not "08". > > Thank you. > > -- > Nicolas > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode