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 / Is DB a llinear language?

Author
Message
MXH
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 13th Oct 2011 02:21
I'm trying to determine if DB is what I need for a program I'm wanting to create.

If I remember correctly, BASIC was very linear--going line by line of code. You could have a main loop, but if you did a subroutine (GOSUB, for example) then the main loop went on hold while the subroutine was being run.

I was wondering if DB has the same limitation?

What I need is the ability to have a main loop running, while an event causes another loop/subroutine without stopping the main loop.
Kezzla
16
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 13th Oct 2011 06:30 Edited at: 13th Oct 2011 06:33
It is linear. however...



it still looks as though its all happening simultaneously.
so while it is linear, it shouldn't be a problem for most tasks.

Sometimes I like to use words out of contents
Da_Rhyno
13
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 13th Oct 2011 07:17
Or you could use the timer to emulate multithreading... which would be a witch of a thing to do maybe...
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 13th Oct 2011 09:33
Quote: "I was wondering if DB has the same limitation?"


It's not a limitation it's normal... just like if I dropped my pen it's normal for gravity to pull it to the floor. Every programming language has a program flow that is linear but goes so fast it appears to be doing a lot of things at the same time like Kezzla's example shows.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Oct 2011 11:53
the correct term is procedural rather than linear.
As Grog says, object-oriented programming is still mainly smoke and mirrors. You still have a controlling program that is running linearly to see which classes need attention.

MXH
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 14th Oct 2011 03:43
Interesting. I wrote some scripts for another program, but because computers are so much faster now, it seemed the scripts were running independent of the main program.

Just a quick questions, please:

It is possible to have DBpro read an .XML file, for example, to retrieve data for use in a program without requiring the Styx download?
nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 15th Oct 2011 00:26
You could write your own functions for reading the xml data since essentially its still just text and when it comes to text manipulation, there are only 3 functions you need from a language (2 if you want to make it challenging). Essentially you want to read the .xml document until you find <what you are looking for> and then get that data and cease reading at the end of </what you are looking for>, for example. I think the limits lie in what you want to use that xml data for. Vector-graphics wouldn't be something I'd wanna attempt but just storing data, hell why not.

Login to post a reply

Server time is: 2024-11-22 12:12:05
Your offset time is: 2024-11-22 12:12:05