On Fri, Jun 18, 2004 at 03:54:39PM +0200, Eike Lange wrote:
On Friday 18 June 2004 15:40, Igor Marnat wrote:
But how can I get these values of C preprocessor definitions in my Pascal program?
Please note, that "asmname" is deprecated.
In C
int foo = FOO_CONST;
where FOO_CONST is defined somewhere else.
In Pascal:
var MyFoo: Integer; attribute (name='foo') ; external; (untested)
Eike
Better yet:
const int foo = FOO_CONST;
var MyFoo: Integer; attribute (name = 'foo', const, external); ^^^^^
Then the compiler treats the variable as constant, so it can't be modified in the Pascal code by accident.
Emil Jerabek