[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.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
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.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
