Re: About speed
- Posted by Jeremy Cowgar <jeremy at ?ow?ar.com> Jun 03, 2008
- 602 views
ken mortenson wrote: > > I need to answer the other part of your question. > > Jeremy Cowgar wrote: > > The variables that while cond2, cond3, > > etc... need to access from the original calling function? > > Of course, in my example you'd have to pass in any values needed by the > internal conditions which is slower. I've seen this argument taken to > the extreme where NO parameters are passed, just make all variables global. > > I'm sure you see the problem with that. > I probably would take it to the extreme and simply include the 3 or 4 lines that the function would do right inside of the loop and use the new 4.0 features to exit which ever loop I wished. One thing is for sure, most of the programs I write have zero global variables. Once in a while I'll do something dirty in utility type apps and have a global database handle or something. -- Jeremy Cowgar http://jeremy.cowgar.com