Posts: 6,419
Threads: 74
Joined: Mar 2002
Quote:Sometimes, a GOTO comes handy to do an optimization
In other words, you can always find an structured solution, but sometimes GOTO is faster.
Posts: 26
Threads: 0
Joined: Jul 2004
Quote:long names for variables may even slow up the program.
Please explain, I don't understand.
Posts: 488
Threads: 19
Joined: Sep 2005
longer varibles means more chars in the porogram making it slightly bigger, and longer variable names lengthens the seach of the program if u have variables with similar names, wat ive done in the past is at the and of production, i use the change function in qb to change all variales to a - z using appropriate symbols, and if more are required, then i use aa - zz, etc. and the goto thing can help, like wat if u want to exit a sub(s) without completeing it, and exit the loop(s) without using an extra variable called like exitloop or something like that
Posts: 484
Threads: 14
Joined: Apr 2005
i was under the impression that varnames are changed during compilation to adresss therefore all varnames will be essentially the same size on compilation. I could be wrong though
EVEN MEN OF STEEL RUST.
Posts: 488
Threads: 19
Joined: Sep 2005
be rite though, i nvr decomplied a qb program to see if it does change the variables to adresses along with removing comments ot remarks
Posts: 285
Threads: 70
Joined: Feb 2005
The way I solved the problem a long time ago of using text book style of long descriptive names for variables etc is to compromise by using short abbrevaited descriptions. Alternatively list very short variables along with their full descriptions at the start of the program
Gordon
Posts: 26
Threads: 0
Joined: Jul 2004
Axipher, have you tried compiling a program before and after you changed all the names of the variables and see if the resulting exes were different? My guess is that the exes are exactly the same, or you made a mistake while changing the names.
Posts: 488
Threads: 19
Joined: Sep 2005
i have tried yes and it does make a slight speed diference, of course my programs were small so bigger programs may be slightly different, its not really that much though, the most it affects for me is getting keyboard and mouse input, other then that it works pretty much the same
Posts: 3,368
Threads: 195
Joined: Jan 2003
Quote:
long names for variables may even slow up the program
Slow......up? :lol:
I think in general this is not just about GOTO but about having to "structure" every single line as much as possible, and this would often include unnecessary TYPE-like structures.
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.
Posts: 602
Threads: 27
Joined: Oct 2004
aga, what was the biggest application you ever wrote and how long was the maintenance phase after you finished the application?
quote="NecrosIhsan"]
[/quote]