× 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.



Dennis Lovelady wrote:
chain ItemNo ItemMaster;
if not %found;
Valid = *on;
endif;

. . . 100 lines of code . . .

if Valid;
// use item
endif;

Yet, you still got it wrong. Because clearly the item is valid if it
is
found in the ItemMaster. Not that your basic premise is bad; it's just

So you're familiar with this item addition program, and you question its
logic? :) It's not so clear, if you don't know what's happening. If I
want to add an item with a preassigned number, does it not make sense for me
to check the item master to make sure it doesn't already exist? And if it
doesn't, isn't the addition then valid?

I have no problem with Scott's logic, maybe because I have no no
presumptions about what it might be doing.

Oh please (ROFL!). That sounds like someone saying that global warming is causing record snowfalls. It's the sort of non sequitur justification I expect from politicians, not programmers. And the comment "use item" requires you to even more tightly twist your pretzel logic. I guess you're saying that when he says "use" he means "add a new one". That's more obfuscatory than Clinton at his "meaning of is, is" best.

But thank you for making my argument for me: it's not the use of "not" that makes a program more or less readable, it's general common sense. In this case, the variable name "Valid" is a particularly poor one because it's not at all clear what "valid" means. But that's my opinion, and that's the crux of the argument: programming is very much about opinion, and style is in the eye of the beholder.

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.