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 Discussion / Need help with variables.

Author
Message
Blazer
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 2nd Feb 2003 00:17
How do you Use the text command to print a variable? I have the classic db. I know I can print it but it won't let me use text, how do I position it?
As I walk through the vally of the shadow of death, I will fear no evil.
Easily Confused
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 2nd Feb 2003 00:31
You need str$()

var = 10
Text 320, 240, str$(var)

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
Easily Confused
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 2nd Feb 2003 00:33
...unless your variable is a string then you don't need it:

var$ = "hello"
Text 320, 240, var$

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
Blazer
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 2nd Feb 2003 00:47
thx

As I walk through the vally of the shadow of death, I will fear no evil.

Login to post a reply

Server time is: 2025-08-08 11:44:56
Your offset time is: 2025-08-08 11:44:56