Weird syntax error with lookups using keywords for cursor names

Tyler tyler.style at gmail.com
Thu Apr 5 14:38:02 PDT 2007


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?

Tyler


More information about the Filepro-list mailing list