Price rounding: Delete after coma

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Price rounding: Delete after coma

Post by ace16vitamine » Fri Jun 08, 2018 6:44 pm

ähm no. My Question: Any Ideas how to round the datas in my Array? :D

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Price rounding: Delete after coma

Post by Klaus » Fri Jun 08, 2018 6:50 pm

That's what I meant! Ever heard of REPEAT loops? 8)

Code: Select all

...
put t_array["vkpreise"] into ttt

## This is a typical example of the above mentioned REPEAT loop! :-D
repeat for each line tLine in ttt
   put format("%1.2f",tLine) & CR after ttt2
end repeat

## Delete last CR
delete char -1 of ttt2
put ttt2 into t_array["vkpreise"]
...

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Price rounding: Delete after coma

Post by ace16vitamine » Sat Jun 09, 2018 12:40 am

Klaus wrote:
Fri Jun 08, 2018 6:50 pm
That's what I meant! Ever heard of REPEAT loops? 8)
sure… now :-)

It is working Klaus, thank you!

Stef

Post Reply

Return to “Databases”