Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB array help; TWO PROGRAMS
#11
The idea is simple. Your libraries of functions have to be completely isolated. Only access to their functionality thru' the observer and modifier functions. Don't rely on the library implementation to use it, just on the API, as Cha0s said.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#12
But, in this example, this is pretty routine stuff. There is a tradeoff between remembering function names/taking the time to make them functions, and remembering how to write what is in the function. The functions are redundant.
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.
Reply
#13
you can lead a horse to water...
Reply
#14
Exactly!
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.
Reply
#15
But the next time he has to code a simmilar program, he can just reuse all that code instead of having to work it out form the ground up.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#16
Yes, he could, but if he suddenly forgot how to that works and he needed to modify the code, he would be in trouble....

Again, to follow up on previous posts and my TYPE rant, it might not be such a good idea to try to teach everything at once to someone new..
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.
Reply
#17
Even though I admire and respect Na_th_an and cha0s, I have to agree with Agamemnus on this one! Everyone starts to learn with simple examples, not with profound and all-encompassing explanations...these come later; much later, once great understanding has set in.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#18
nope sorry, youre both wrong.

the point is he never HAS to modify the code i posted, only his. the interface between his code and my "API" never changes, because my part of code always does the same operation everytime.

not that hard to understand..
Reply
#19
Yes, that's true, he doesn't have to modify it...
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.
Reply
#20
and what is so hard to understand about what i posted originally anyway? seriously.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)