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.

Newcomers DBPro Corner / quick easy question about floats and text

Author
Message
Newbie Brogo
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: In a Pool of Cats
Posted: 6th Aug 2003 19:05
how could i put a float in a text? sorry for my noobness but i havent done a float or string in a print yet... i use DBC
You did what? For who?! For how many jellybeans?!?
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 6th Aug 2003 19:06
text 0,0,str$(number#)

works for me,cheers

Mentor.

Newbie Brogo
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: In a Pool of Cats
Posted: 6th Aug 2003 19:14
Umm... sorry i put this wrong, how to i put a float in a print command?
print float# + "?"

You did what? For who?! For how many jellybeans?!?
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 6th Aug 2003 19:27
str$ converts a float or integer to a string value.
It only says it does integers in the help but works with floats as well

print str$(float#)+"?"

You should use
print str$(float#)
if you only want to print a float as for some reason the dbp print commant shows floats with less precision that srt$().
Newbie Brogo
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: In a Pool of Cats
Posted: 6th Aug 2003 19:38
k.. thanks.. i'll try it now

You did what? For who?! For how many jellybeans?!?

Login to post a reply

Server time is: 2026-07-06 20:16:00
Your offset time is: 2026-07-06 20:16:00