|
Hi, > So far I think Scott is the only one that agrees with me about no reason > to use sub-routine. If he is not, then I think I'm all alone about > this. I might need to do some rethinking on this. No, I agree with you completely. There's no reason to use a subroutine. There's no reason why they still need to exist in the language, aside from backward-compatibility. If the arguement for still using subroutines is "I need to set global variables, and it's bad to do that in a subprocedure" then I don't think you have a logical argument! The person who makes this argument has been told by someone that global variables are bad in a subprocedure, but s/he doesn't understand WHY. There are distinct advantages to eliminating the use of global variables and having well-defined interfaces to your routines. The use of global variables in a subprocedure is discouraged BECAUSE you lose those advantages. However, it's IMPOSSIBLE to get those advantages with EXSR. If you're going to throw the advantages away, then there's absolutely no value to avoid doing it in a subprocedure.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.