At 13:37 11/2/2004, Anthony Testi wrote (quoting a co-worker): >"I just found a serious bug in FoxPro. > >There is a rule of precedence in FoxPro that says if you have a variable >with the same name as a field in the currently selected alias, the name is a >field name, not a variable.
>What I didn't know is that the same applies to parameter names! >If your parameter name matches a field name in the currently selected alias, >guess what?"
Why is this a bug? (Not to mention why is it "serious"!) Why should the precedence rule for parameter names (which are, after all, variables, be different from those for any other variable? What would your co-worker have it do instead?
Yes, it's a gotcha. But there are lots of others, as there are with any language. We might try finding out why it works the way it does before we start hurling the 'b' word around.
Dan Covill San Diego
©2004 Dan Covill |