Stupid question?

Ryan_sa

New Member
Hi every1. Question is, when doing a find on a table, im used to using if available <tablename>.
Was going through some code other day and noticed some1 was using when available <tablename> .

Both seem to have same results, but want to know what difference is and wich is faster.

Regards.
Have a Merry Xmas.
 

joey.jeremiah

ProgressTalk Moderator
Staff member
here's another one -

for first <tablename> where no-lock:

end.

the advantage with this one is that for statements, unlike find, can use multiple indexes. though, for statements aren't the first choice for doing something similar to if not available. of course theres many ways of writing a program that gets to the same result and many times optimizing performance isn't the only thing to consider or isn't even an issue.

i've seen many programs that were overly complicated and very hard to figure out whats happening just to optimize something like simple string operations and possibly shave off a microseconds or two. in most cases i would write a procedure in a way that would be as simple as possible and easiest to understand, except special cases. besides abl is an interpreted business application language, we're not writing graphic applications in c++.
 
Top