Here's the one I came up with: function makeChange pValue local tChange set the itemdelimiter to comma repeat for each item tCoin in "50,20,10,5,2,1" repeat while pValue >= tCoin put tCoin & comma after tChange subtract tCoin from pValue end repeat end repeat return char 1 to -2 of tChange end makeChange
And for 74 I get 50,20,2,2 -- -Mark Wieder mwie...@ahsoftware.net _______________________________________________ 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