Weird syntax error with lookups using keywords for cursor names
Scott Walker
scottw1 at alltel.net
Thu Apr 5 15:02:42 PDT 2007
Tyler asked:
I'm hoping someone on the filepro mailing list might be able to
explain this to me...is there a rational explanation for it being this
way? I've put up the file I'm discussing at
https://www.kinotox.net/prc.ToInvhead2
If you look at line 104, you'll see that it's perfectly innocuous
except for the fact that it's using a lookup that has a keyword for
it's alias (::lookup user = users k=40 i=A -npx:):
::user(166)=user(166)+"1":
This causes the compiler to bomb out in a very strange way:
*** A filePro Error Has Occurred ***
Line Number: 5
(31 eq "CK" or 31 eq "CP") and 32 eq "" and 29 gt "0"
^
Process contains a syntax error at position indicated.
If I comment out line 5, it just bombs out at the next line that has
parenthesis on it. If I remove all the parenthesis from the if lines,
it starts bombing out on double quotes! eg:
:"AK-HI-PR-" co 16:head2(18) = "AK/HI/PR RATES"; goto nortshp:
None of this happens if I comment out line 104, of course.
Now, I've figured out that this is because USER is actually a keyword
for a command...but why does it bomb out on line 5 instead of the
lookup line or the first time I try to use the lookup cursor? And why
does it let me use a keyword for a lookup name at all?
Scott says:
I think that's a bug in rcabe. I have seen the same behavior several
times in my tables (version 5.0.14). It can be maddening the first time
since the error you are getting reported has nothing obvious to do with
the condition that is actually causing it.
Scott Walker
RAM Systems Corp.
ScottWalker at RAMSystemsCorp.com
Ph: (704) 896-6549
Fx: (704) 896-7458
More information about the Filepro-list
mailing list