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
GMONEY34
13
Years of Service
User Offline
Joined: 19th Apr 2010
Location:
Posted: 4th Jun 2010 05:54
Hi, I have this example from VB and I'm wondering if it can be converted to DB and it would be very helpful.



- Your creativity is only limited by YOUR imagination.
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 4th Jun 2010 14:13 Edited at: 4th Jun 2010 14:14
Looks like it should be easy - DB is a BASIC language, so most of the commands work already.

Few things to note - DBC does not support types, you're only allowed integer, real, and String variables. Constants are unsupported, you'd have to define that either as a variable
, or as a global variable/array


Most importantly, DBC needs a main program loop - it isn't based around procedures, though your Private Sub declarations look like DB subroutines. So you need:


Bits of this won't work directly, I can't follow all your code (don't know the first thing about VB!) but this conversion to DBC has taken me about 5 minutes to type. Hope this helps!

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 4th Jun 2010 22:28
I don't know much about VB either so can't add anything more than robert the robot has. It shouldn't be too difficult though.

However, I'm more interested in your code as it looks like collision for some kind of pool / snooker game.

I had a go at this a couple of years ago with varying degrees of success so would be interested to see your method working in DBC.

Login to post a reply

Server time is: 2024-03-29 14:27:58
Your offset time is: 2024-03-29 14:27:58