exact match

Walter Vaughan wvaughan at steelerubber.com
Mon Mar 22 14:16:56 PST 2004


Steve Waters wrote:

>Walter can you expand on this?
>
>Walter wrote:
>I'd also argue that this routine should
>be comparing to values in another table, rather than
>being hard coded into your processing table.
>
That's the kind of thing that'll always get you
in trouble later... business rules that are so specific
that any change causes you to rewrite
the processing table.
In this case, it just looks like trouble. Maybe
that's the only part number you'll ever need
a popup message associated with. I don't
know your particular situation. But anyone looking
at your code 10 years from now if you had
a "PN_Message" table would understand what's
going on, and you'll look like a hero when you
show everyone "Hey, we can popup a message box
on any part if we need."

@wlf1     if: 'Look and see if we need to display message
	then: lookup PN_Message k=1 i=A -nx
	  if: PN_Message
	then: beep; msgbox PN_Message(2)
	  if: 'end of field 1 processing
	then: end

As long as field #1 in your main file is as wide as
field #1 in your PN_Message file, then you don't have to
worry about padding the "match" with spaces. Everyone Wins.
--
Walter





More information about the Filepro-list mailing list