End and the syntax parser
Alan Mazuti
amazu at trusteeservicesinc.com
Mon Dec 21 16:10:56 PST 2009
Spot on Ken. Now for a round of dead ants!
-----Original Message-----
From: filepro-list-bounces+amazu=trusteeservicesinc.com at lists.celestial.com
[mailto:filepro-list-bounces+amazu=trusteeservicesinc.com at lists.celestial.co
m] On Behalf Of Ken Cole
Sent: Monday, December 21, 2009 4:10 PM
To: Filepro Lists
Subject: End and the syntax parser
This is something for everyone to toy with over the holidays (sorry
for the pun).
Now I think this same point has been discussed previously but without
any action being taken. Should anything be done is the point of the
email.
One of the filePro programmers working here had a problem the other
day that some code didn't seem to be running.
The processing table passed syntax check, created the tok file, etc
and ran to a particular point and then stopped with the rest of the
code not running.
Now this is Sco 5v6.0.0 with filePro 5.0.14R4.
After spending serious time trying to work out why the code wasn't
running, no goto's over the code, no gosub's without returns, etc I
had a look for them and found the problem.
There was a long variable called "EndDate" being used.
The fat fingered, well in this case light fingered, programmer instead
of entering:
EndDate=lookup(6)
had entered:
End=lookup(6)
Now I know Ken has mentioned before that everything after an "end"
statement is ignored when being parsed as it will never be processed.
I am of the mind though that this is a syntax error as a "reserved"
word is being used as a variable and I feel there should have been an
error thrown at syntax check time.
I believe the following rules should be checked.
1. If there is anything after "end" on a line that is not a comment
then it is an error.
2. Reserved words should not be allowed as variables and if attempted
to do so as in this example then it is an error.
What do the rest of you think?
I am wrong in thinking this should throw and error?
Cheers, Merry Christmas and a safe and prosperous New Year.
Ken
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list