You just listen to Ted, Mike. He is invariably right. <g,d&r> It's all in memory either way. As you saw the overhead either way isn't much different.
-- rk -----Original Message----- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of mbsoftwaresoluti...@mbsoftwaresolutions.com Sent: Friday, April 21, 2017 4:50 PM To: profoxt...@leafe.com Subject: Re: Getting count of rows in a text file -- best approach? On 2017-04-21 16:47, Ted Roche wrote: > On Fri, Apr 21, 2017 at 4:37 PM, > <mbsoftwaresoluti...@mbsoftwaresolutions.com> wrote: > >> Testing showed these two pretty much a dead heat: >> >> RowCount = OCCURS(CHR(13),FILETOSTR(m.Filename)) >> RowCount = ALINES(aCrap,FILETOSTR(m.Filename)) >> > > But on the bright side, with Richard's one-liner, you're done reading > in the file: it's sitting in the array. I don't see the difference; yes, it's in the array, but what do I want it for after that? For my processing, I was just comparing this year's file to last year's file and seeing how their record counts differed. Not really working with the file after that. Actually, in looking at those two tests above, I would think the OCCURS would be better because in the upper, the file bulk is in whatever temporary variable created by FILETOSTR(..) but then in Richard's ALINES test, that same file is in the temporary variable like Test1 BUT it's ALSO in the aCrap array. Correct???? [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/bn4pr10mb0913c4d508bb4060af0a5f17d2...@bn4pr10mb0913.namprd10.prod.outlook.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.