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.

DarkBASIC Professional Discussion / How can I convert a real# to a string$ ?

Author
Message
Sam Cruise
23
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 27th Mar 2003 00:33
Can anyone help me out here?
heartbone
23
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 27th Mar 2003 00:37
r#= 1.23455
s$= STR$(r#)

The more you see, the more you know.
The more you know, the more you see.
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 27th Mar 2003 00:38
string$ = str$(real#)

The help says to use a integer with the str$ command but it appears to work with reals as well.

Sam Cruise
23
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 27th Mar 2003 00:40
Aha! - I never thought of using str$ as the manual said not too.

Thanks

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Mar 2003 04:14
str$ just converts whatever you have into a string...

so like str$(%10010011) would convert to "10010011"
dbpro may kick up a BIG fuss about it sometimes, not sure why and because of that uncertainty is why its not recommended.

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?

Login to post a reply

Server time is: 2026-07-12 00:27:23
Your offset time is: 2026-07-12 00:27:23