Not a bad habit if you put the globals into a locale, I say.
Henry Rich On 1/18/2022 6:46 PM, Raul Miller wrote:
I definitely see the appeal of a recursive solution which avoids globals. That said, I've been parsing enough really large files that I've gotten into the habit of using globals for managing parsing state. Plausibly a *bad* habit... Here, I could have made the data dependencies explicit by passing 'pos' and 'vsum' as m and 'packet' as n, for example. This would have made my result structures a bit messier, but maybe that would have been ok? Thanks,
-- This email has been checked for viruses by AVG. https://www.avg.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm