Programing style

Hershel Fisch hershf at rgllc.us
Thu Nov 16 18:37:48 EST 2006


On 11/16/06 5:06 PM, "Jim Ault" <JimAultWins at yahoo.com> wrote:

> Forgot to ask about final format  ? two decimals ?
Yes, but I don't understand your code.
> Add one line at the end to handle this 'if there are no decimals'
> 
> 
> On 11/16/06 2:00 PM, "Jim Ault" <JimAultWins at yahoo.com> wrote:
> 
>> --takes advantage of Rev parsing
>> --does not handle negative numbers
>>> function fNumericToMoney
>> put param(1) into tParam
>>  set itemdel to "."
> 
>>   put item 1 of tParam into newNum
>>   set the lineDel to ","
?
>>   repeat until char 1 of newNum is ","
?
>>     put "," before char -3 of line 1 of newNum
?
>>   end repeat
>>   put "$" into char 1 of newNum
> if item 2 of tParam is not empty
> then put  "." & item 2 of tParam after newNum
>>   return newNum
>>> end fNumericToMoney
>> 




More information about the use-livecode mailing list