Skybuck Flying
2014-04-30 15:05:29 UTC
Following code does not compile:
const function Region( ParaX, ParaY, ParaWidth, ParaHeight : integer ) :
TRegion;
begin
result.mX := ParaX;
result.mY := ParaY;
result.mWidth := ParaWidth;
result.mHeight := ParaHeight;
end;
const
RegionGameLoginScreen = Region(610,670,60,37);
RegionGameLoginError = Region(503,341,158,47);
"
[dcc32 Error] unit_TDiliNewSwitcher_version_017.pas(132): E2026 Constant
expression expected
"
Would be nice if constant functions were supported to be able to initialize
"constant structures/variables".
Bye,
Skybuck.
const function Region( ParaX, ParaY, ParaWidth, ParaHeight : integer ) :
TRegion;
begin
result.mX := ParaX;
result.mY := ParaY;
result.mWidth := ParaWidth;
result.mHeight := ParaHeight;
end;
const
RegionGameLoginScreen = Region(610,670,60,37);
RegionGameLoginError = Region(503,341,158,47);
"
[dcc32 Error] unit_TDiliNewSwitcher_version_017.pas(132): E2026 Constant
expression expected
"
Would be nice if constant functions were supported to be able to initialize
"constant structures/variables".
Bye,
Skybuck.