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 / Ok I need some help here!!!!!

Author
Message
blue triforce
21
Years of Service
User Offline
Joined: 18th Jun 2003
Location:
Posted: 19th Jun 2003 06:06

I am a complete beginner to dark basic. For hours I been trying to get this code right. I am trying to figure out how could i programming a simple integer answer to this problem 3 + 2 = 5 I could not figure this out without your help.
here's a sample of my code

a=3
b=2
set cursor 1,1
print a$
set cursor 20,1
print b$

a=3 will be 3, b=2 will be 2 and c the answer would be 5. What commands do i use if the answer is not 5 to count it wrong, but the input is 5 the answer is correct

Please help meeeeeeeeeee!
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 19th Jun 2003 06:10
This is the code you gave but it wouldn't work because you need to convert the integers to strings.


This code would give the answer:


JetRace coming. Watch out!
CrayZemon
21
Years of Service
User Offline
Joined: 16th Jun 2003
Location: United States
Posted: 19th Jun 2003 06:15
"$" are only used for strings like:
$greeting = "howdy pardner!"
print $greeting

leave out "$"s for integers like 1 - 2 - 3 and so on. Take those dollar signs out and your code should start working fine! Also remember that the SET CURSOR command goes by pixels and not by character spaces, so maybe set your next cursor setting to something like 40,40 to observe a really noticeable difference. ENJOY

"I need gopher-chucks!!"
CrayZemon
21
Years of Service
User Offline
Joined: 16th Jun 2003
Location: United States
Posted: 19th Jun 2003 06:17
Oops, looks like IntermediateNewbie and I are talking at the same time. He's got it covered in addition to you wanting to add the integers.

"I need gopher-chucks!!"

Login to post a reply

Server time is: 2024-11-24 18:33:48
Your offset time is: 2024-11-24 18:33:48