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 / extreme newbie question

Author
Message
_GTP
21
Years of Service
User Offline
Joined: 16th Sep 2003
Location:
Posted: 10th Oct 2003 23:01
Hi,

I'm new to darkbasic and i'm wondering whether my install of DB is somewhat messed up or whether its natural behavior.

I was reading the manual and tried the first piece of code i could find.

A = 3 + 4
print A

It runs i think but the screen flashes and goes back. Is this natural since its just two lines of code and the program technically has been executed or am i perhaps missing something?

The reason for asking such a dumb question is because the manual asks to execute certain code but i can't see the output because the screen simply flashes by. That led me to believe that something may have been wrong in the install.

is this natural or have i made some possible mistake?

thanks
PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 10th Oct 2003 23:06
First off, next time put your code into the code snippet thing. Makes things easier.

Next, I think that A is too close to the print, the way you have it there.

Also, try using this code:



It works on my computer. If it doesn't work on yours, something is wrong...

Destroy you with my mind, I could!
. Cool, he is. Play his games, I do.
Pyro_guy
21
Years of Service
User Offline
Joined: 10th Oct 2003
Location: England
Posted: 10th Oct 2003 23:16 Edited at: 10th Oct 2003 23:18
Place a WAIT KEY statment or an empty loop:
DO
LOOP

at the end of your program, and things should work fine



Screw the rules...what can i blow up?
_GTP
21
Years of Service
User Offline
Joined: 16th Sep 2003
Location:
Posted: 10th Oct 2003 23:18
I think you're misunderstanding my message.

I'm not having an issue with the code.

its the execution of it.

Because its only two lines, it simply executes, ends and goes back to DB.

I believe that is its natural behavior.

thanks though.
_GTP
21
Years of Service
User Offline
Joined: 16th Sep 2003
Location:
Posted: 10th Oct 2003 23:19
yes, pyro_guy, i belive ur right. its just the natural behavior thanks for confirming it.

noop
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 12th Oct 2003 06:06
PoHa!84

why ream the guy for not using a snippet when he only listed two lines of code? Nothing better to do?

Anyway to answer the original question, yes, the two lines of code executed and then the program ended. Use WAIT KEY as mentioned above.

Good Luck

-RUST-
y!Ck
21
Years of Service
User Offline
Joined: 2nd Jul 2003
Location: Europe - Netherland
Posted: 12th Oct 2003 14:35
Becuz if you use WAIT KEY or anything like that your program won't and before you get to see what it has done because it takes more time for you to look than for the computer to render

Why live life if you die anyway.

Login to post a reply

Server time is: 2024-11-25 13:13:30
Your offset time is: 2024-11-25 13:13:30