Added support for constants declared as
[static] const AType AName = AnExpression;
("static" needed for C, can be omitted in C++)
E.g.
const int I = 5; // output -> I : Integer = 5;
*static const char S = "Hi!"; // output -> S : PChar = 'Hi!';const MY_INT_TYPE NUM = 42; // output-> NUM : MY_INT_TYPE = 42;**
Processing of the right hand side expression uses the code original used for #defined constants. This common code now resides in
procedure WriteConstantsRhs(), and is called from
procedure WriteDefinedConstant() (for #defines)
and WriteTypedConstant() (for const statements as above)
P.S. My first pull request, hope I got everything right...
Added support for constants declared as [static] const AType AName = AnExpression; ("static" needed for C, can be omitted in C++)
E.g.
const int I = 5; // output -> I : Integer = 5; *static const char S = "Hi!"; // output -> S : PChar = 'Hi!'; const MY_INT_TYPE NUM = 42; // output-> NUM : MY_INT_TYPE = 42;**
Processing of the right hand side expression uses the code original used for #defined constants. This common code now resides in procedure WriteConstantsRhs(), and is called from procedure WriteDefinedConstant() (for #defines) and WriteTypedConstant() (for const statements as above)
P.S. My first pull request, hope I got everything right...