[fpc-pascal] deprecated syntax is inconsistent.
    Graeme Geldenhuys 
    graemeg.lists at gmail.com
       
    Thu Apr 29 12:00:44 CEST 2010
    
    
  
Michael Van Canneyt het geskryf:
> 
> Jonas tried to explain that this is not possible.
Yes, but it is still very easy to detect the difference... I'll use your
example:
> Consider the following - what  you propose - statements:
> 
> Var
>    A : Integer;
>    deprecated : Boolean;
> 
> The compiler cannot decide whether the 'deprecated' is a modifier or the
Yes it can, because in your example 'deprecated' is followed by a colon and
a type.
 Var
    A : Integer; deprecated;
This is *not* ambiguous at all, because the hint directive is immediately
followed by a semicolon. That is not the case in a type declaration like
you showed. A pretty clear difference.
> 
> Var
>    A : Integer deprecated;
>    Deprecated : Boolean;
My suggestion could still work...
 Var
    A: Integer; deprecated;
    Deprecated: Boolean;
One is a hint directive because it follows a (type with) semicolon and is
immediately followed by another semicolon.  The type declaration is
followed by a colon and a type. This looks pretty clear to me, and not
ambiguous at all.
Regards,
  - Graeme -
-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/
    
    
More information about the fpc-pascal
mailing list