Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Printing decimals

Author
Message
Rickynzx
12
Years of Service
User Offline
Joined: 19th Dec 2011
Location: Troon, Scotland
Posted: 7th Jan 2012 13:38
Hi guys.

Is there any way to print floats by limiting to 2 decimal places for currency?

I cant seem to find anything.

Any help grateful.

Thanks
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Jan 2012 16:29
myFloat$ = str(myFloatValue#, 2)
print myFloat$

Rickynzx
12
Years of Service
User Offline
Joined: 19th Dec 2011
Location: Troon, Scotland
Posted: 8th Jan 2012 14:19
Thanks a lot.


great help

Rickynzx
Rickynzx
12
Years of Service
User Offline
Joined: 19th Dec 2011
Location: Troon, Scotland
Posted: 8th Jan 2012 14:19
Thanks a lot.


great help

Rickynzx

Login to post a reply

Server time is: 2024-11-22 20:16:32
Your offset time is: 2024-11-22 20:16:32