× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 3/20/2011 4:56 PM, Larry Ducie wrote:
Hi Joe,


setll (key1) addressFile;
reade (key1) addressFile;
dow not %eof(addressFile);

if someCriteria = true;
chain (key2) geoCodeFile;
if %found(geoCodeFile);
// do something with the long and lat...
endif;
endif;

reade (key1) addressFile;

enddo;

Thanks, Larry! I think I get your point. But why is the above better than this:

setll (key1) addressFile;
reade (key1) addressFile;
dow not %eof(addressFile);

if someCriteria = true;
getGeoCode( key2: dsGeoCode: rc);
if rc = OK;
// do something with the long and lat...
endif;
endif;

reade (key1) addressFile;

enddo;


Why is the chain better than the call? The more I see this, the more I have a problem with usurping a known opcode. Prior to this, READ/CHAIN was getting data from a database. Now I'm not really sure what it's doing.

Anyway, enough on this particular topic. Either way works, and they're both doing essentially the same thing. I think it really is opinion at this point.

Joe

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.