This actually just bit me in the ass this week.

We have a program that is nearly 20 years old.  In a SQL statment I have a line 
that should read

   Where Orig_princ - princ_paid + adj_princ>50

but for how long, I don't know, it said

   Where Orig_princ-princ_paid_adj_princ>50

So it was only returning the items where the orig_princ was greater than 50.  
So any accounts with a positive adjustment that brought the balance over 50 
were ignored.  

 Had I put in database name prefixes, the compiler would have caught the syntax 
error.  Instead, it evaluated princ_paid_adj_princ to zero.  I don't know why 
it didn't call that out as an undefined variable, but it didn't.



--- On Thu, 6/9/11, Stephen Russell <[email protected]> wrote:

> From: Stephen Russell <[email protected]>
> Subject: Re: [NF] Great presentation on commenting (or not commenting) your 
> code
> To: "ProFox Email List" <[email protected]>
> Date: Thursday, June 9, 2011, 3:43 PM
> On Thu, Jun 9, 2011 at 2:32 PM, MB
> Software Solutions, LLC
> <[email protected]>
> wrote:
> > On 6/9/2011 3:24 PM, Michael Madigan wrote:
> >> I worked for a company where one guy wrote a
> completely unintelligible program in foxpro.  He had
> indexes and relations based on recno(), completely cryptic
> descriptions, and changed work areas back and forth rather
> than use the databasname.fieldname conventions.    The
> poor bastards who owned the company don't know how close
> they are to Armegeddon.
> >
> >
> > What makes a guy do that kind of thing?  Does he have
> any shred of ethics?
> ---------------------
> 
> Cause
> 
> A->CompCode  was the rage in Foxpro 1 And we had 16
> of those letters
> back then didn't we?
> 
> 
> -- 
> Stephen Russell
> 
> Unified Health Services
> 60 Germantown Court
> Suite 220
> Cordova, TN 38018
> 
> Telephone: 888.510.2667
> 
> 901.246-0159 cell
> 
> _______________________________________________
> Post Messages to: [email protected]
> Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
> OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
> Searchable Archive: http://leafe.com/archives/search/profox
> This message: 
> http://leafe.com/archives/byMID/profox/[email protected]
> ** 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.
> 

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** 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.

Reply via email to