[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
QbasicFAQ_WhyFunctions
Why should I use functions?


Back to QBasic FAQ Main Page.

Good programming practice dictates that whenever you can create a module of any type to support your coding, you should. If it can be done easier, and repeatedly though a FUNCTION, then by all means, you should create a FUNCTION to do it. A well written function can be called time and time again with just a command, and save so much coding. The benefit is that FUNCTIONs can be recursive. Meaning that it can call itself! (This applies to SUBs too.) That way a simple task can be repeated until a condition is met, and it then becomes a complex task in very few lines of code.

last edited (December 9, 2002) by KDivad Leahcim, Number of views: 1559, Current Rev: 2 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.