Qbasicnews.com
December 15, 2019, 06:01:55 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 11
  Print  
Author Topic: Structured Programming  (Read 31794 times)
GordonSweet
Guru
**
Posts: 287



WWW
« on: December 05, 2005, 08:29:08 AM »

I am having a argument with some guys over here in the UK, about Structured Programming which they consider extremely important as taught in some schools etc I believe. Am I not mistaken in thinking this may be all very laudable, but that in most BASICS such as Qbasic and Fbasic you cannot adopt Structured Programming, such as perhaps the almost complete elimination of GOTO.

Gordon
Logged
Plasma
Na_th_an
*****
Posts: 1770


WWW
« Reply #1 on: December 05, 2005, 09:09:30 AM »

You can adopt structured programming in almost any procedural language, QB and FB included. In fact, most QB and nearly all FB programs are structured.
Logged
GordonSweet
Guru
**
Posts: 287



WWW
« Reply #2 on: December 05, 2005, 11:57:07 AM »

Thanks Plasma

I did learn the principles years ago. I assume the main object is to try to avoid the use of GOTO.

Gordon
Logged
axipher
Ancient Guru
****
Posts: 544



« Reply #3 on: December 05, 2005, 12:19:33 PM »

heres a pretty simple structure idea,

->Define variables
->Main loops or program
->Sub routines
->Data statements

its rpetty simple, plus having different ppl asigned to things like graphics, sound, and such is a good idea[/list]
Logged
marzecTM
Ancient Guru
****
Posts: 688


« Reply #4 on: December 05, 2005, 12:35:58 PM »

Quote from: "Plasma"
You can adopt structured programming in almost any procedural language, QB and FB included.


true

Quote from: "Plasma"
In fact, most QB and nearly all FB programs are structured.


muahah...
Logged

quote="NecrosIhsan"]

[/quote]
yetifoot
Ancient Guru
****
Posts: 575



« Reply #5 on: December 05, 2005, 01:58:37 PM »

what about ASM?, im not a massive ASM geek but the Assemblers i've used you have to implement your own versions of constructs such as DO, IF etc using labels and gotos.  does this mean its an unstructured language?
Logged

EVEN MEN OF STEEL RUST.
MystikShadows
Ancient Guru
****
Posts: 542



WWW
« Reply #6 on: December 05, 2005, 02:58:57 PM »

ASM in itself has no structure....no loops, no IFs...just JUMPS and Labels.  :-).
Logged

hen they say it can't be done, THAT's when they call me ;-).




need hosting:  http://www.jc-hosting.net
All about ASCII: http://www.ascii-world.com
TheDarkJay
I hold this place together
*****
Posts: 913



WWW
« Reply #7 on: December 05, 2005, 03:02:05 PM »

ASM is often described as "Random Code with no structure what so-ever"
Logged

url=http://www.sloganizer.net/en/][/url]
yetifoot
Ancient Guru
****
Posts: 575



« Reply #8 on: December 05, 2005, 04:47:38 PM »

Quote
just JUMPS


yeah shows how long ive been away from the big bad wolf when im calling em gotos!
Logged

EVEN MEN OF STEEL RUST.
TheDarkJay
I hold this place together
*****
Posts: 913



WWW
« Reply #9 on: December 05, 2005, 05:07:31 PM »

I used to use GOTO all the time. Now i use multiple loops and 'Access' variables to allow passage through them loops
Logged

url=http://www.sloganizer.net/en/][/url]
axipher
Ancient Guru
****
Posts: 544



« Reply #10 on: December 05, 2005, 10:45:27 PM »

well i cant say im structured, afterall i just really started making a game where it doesnt end after a set amount of commands like a question game, but i cant say im not structured, if anyone has seen my code, i try and keep it structured, atleast i think
Logged
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #11 on: December 05, 2005, 11:00:30 PM »

The words "structured programming" are abused.
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
axipher
Ancient Guru
****
Posts: 544



« Reply #12 on: December 06, 2005, 06:05:14 PM »

how are the words abused, yes the words vary in definition, but that doesnt mean tehre abused, unless ur thinking something else
Logged
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #13 on: December 06, 2005, 11:57:13 PM »

Yes, they are abused because people twist their definition to their own evil needs.
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
axipher
Ancient Guru
****
Posts: 544



« Reply #14 on: December 07, 2005, 12:47:17 AM »

well everyone has there own needs which need to be met am i right, but just because someone takes them a different way then u think they should be taken doesnt mean they are being abused, although i could be wrong rite AGA, look at my code for the patin program for instance, which i got working, then i did something and it got messed up, and notepad only has 1 undo lvl
Logged
Pages: [1] 2 3 ... 11
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!