David James wrote:
I'm trying to upgrade from gpc version 19991030 to 20010306 both based on 2.95.2 19991024 (released).
I've found the change in the positioning of 'asmname', and the removal of the 'char-escapes' directive.
It looks as if 'class' has become a reserved word, which is unfortunate as it is a variable name our code uses frequently.
First question: is class now reserved in some way?
Yes (Delphi compatibility).
Second question: is there any easy way for me to disable this?
Unfortunately I don't think specifying the Pascal dialect (using --extended-pascal, --borland-pascal, etc) will help me because the source code uses a mixture of dialects often in the same file. Is going throughthe source and changing all occurrences of class into something else going to be my easiest course of action?
I think it's only "conditionally reserved" (like many keywords from various dialects are). E.g., `var Class: Integer;' seems to work. But I'm not sure in which situations it works and in which it doesn't (optimally, in all those situations where it can't be confused with a class type declaration). Could you post some problematic example code?
Third question: any thoughts on whether there any other syntax changes I might trip over?
Have you checked the `News' chapter of the manual, in particular the first section and all items marked with `(@)' (as explained there)?
Frank