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.

Author
Message
Abrahim
22
Years of Service
User Offline
Joined: 15th Nov 2003
Location: Amazonas, Brazil
Posted: 15th Nov 2003 21:13
Hi, I´m new to DBPro and I am experiencing a small issue which I don´t know it is normal or not. Every time I run a small program like that PRINT "HELLO WORLD" thing or something like that the program window just "flashes". It opens, runs and closes very quickly. Wasn´t the program supposed to remain on screen after it finishes to run? and then return to the DBPro screen only if I pressed ESC? I hope I made myself clear enough, if not, ask away.

Thanks anyway.
Sumo
22
Years of Service
User Offline
Joined: 29th Sep 2003
Location:
Posted: 15th Nov 2003 21:29
use the command "wait key" at the end of the program. that will make the program wait until you press a key


Regards

If animals weren't meant to be eaten
Why are they made out of meat?
Asheron
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 15th Nov 2003 21:39
Here is something might help might not


[start of program]
print "hello world"
[end of program]

that does only the printing of "hello world" it has nothing to suspend it after that.

[start of program]
print "hello world"
wait key
[end of program]

This will wait for user input before exiting.

[start of program]
Do
print "hello world"
loop
[end of program]

This is an infinite loop. It will continually repeat the code between do and loop until broken by the user or an exit command. With the print command every time you use it the cursor is moved down one line. So this will fill the entire left side of the screen with "hello world"

Hope that helps. if not catch me on rgt or there are plenty of smart people here.
Shadow Lord
22
Years of Service
User Offline
Joined: 26th Sep 2003
Location:
Posted: 15th Nov 2003 22:53
Or you could do this...

Do
cls
text 10,10,"hello world"
loop

This will print at screen coordinates 10,10 only.

I'm using DBPro to write "Suger Free Candyland", for diabetic children!
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 15th Nov 2003 23:37
or

sync on
sync rate 100

do
set cursor 0,0
print "This is silly"
if spacekey()=1 then end
sync
loop

-RUST-
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 17th Nov 2003 12:58
This, on the other hand, is quite quite wrong and even slightly evil:

do
loop
print "Otiose"

What do you mean, bears aren't supposed to wear hats and a tie?

Login to post a reply

Server time is: 2026-07-26 20:16:24
Your offset time is: 2026-07-26 20:16:24