[fpc-devel] Reserved words in OLE automation properties

Werner Pamler werner.pamler at freenet.de
Sat Sep 28 18:50:05 CEST 2019


I am porting an older Delphi project to Lazarus/FPC which analyzes the 
internal structure of PowerPoint files using OLE automation. While the 
overall program is working I am stuck with some OLE properties which 
have the name of Pascal keywords, e.g. Shape.*Type *or ColorEffect.*To*.

FPC 3.0.4 and trunk refuse to compile lines like

     DisplayValue('Type', MsoShapeTypeStr(AShape.Type), true);

even if {$MODE DELPHI} is used. AShape is an OLEVariant, MsoShapeTypeStr 
a function which converts the integer value of AShape.Type to a string. 
The error message is 'Fatal: Syntax error, "identifier" expected but 
"TYPE" found'.

Any idea how I could make this work?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190928/e65cb891/attachment.html>


More information about the fpc-devel mailing list