Delphi: All constants are constant, but some are more constant than others?
Posted
by Ian Boyd
on Stack Overflow
See other posts from Stack Overflow
or by Ian Boyd
Published on 2010-04-26T14:47:14Z
Indexed on
2010/04/26
15:03 UTC
Read the original article
Hit count: 297
Consider:
clHotlight: TColor = $00FF9933;
clLink = clHotLight; //alias of clHotlight
[Error] file.pas: Constant expression expected
and the alternate wording that works:
clHotlight = TColor($00FF9933);
clLink = clHotLight; //alias of clHotlight
Explain.
Then consider:
AdministratorGUID: TGUID = '{DE44EEA0-6712-11D4-ADD4-0006295717DA}';
SuperuserGUID = AdministratorGUID; //alias of AdministratorGUID
[Error] file.pas: Constant expression expected
And fix.
© Stack Overflow or respective owner