6 Subprograms and Functions: Useful Specialists
6.1 Why Subprograms and Functions?
Not infrequently in writing a program we have occasion to perform the same calculation more than once within that program. For example, we may need to solve different quadratic equations several times within a program. Each time we must do this, it would be possible to include the lines of code we developed in Chapter 4. But it would be more efficient if we included that coding only once somewhere in our program and go to that code location whenever we need to solve a quadratic equation. We would then return to the part of the program from which we made ...
Get Numerical Methods with VBA Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.