In a message dated 10/25/2005 6:25:40 AM Eastern Standard Time, v_sriharikumar@yahoo.com writes:
I want to write a macro which should compatible with gpc version 2.1 and look like below
#define PAS_EXTERNAL_C(X) asmname 'X'
suppose if i define a macro like above, it should be preprocessed like below
Before preprocessing:
procedure Hello; PAS_EXTERNAL_C(Hello);
After preprocessing:
procedure Hello; asmname 'Hello';
I am worried why #define PAS_EXTERNAL_C(X) asmname 'X' this is not working?
Please help me
Regards Hari
Using the Pascal Macro Compiler you can produce the desired results this way.
You define the macro procedure PAS_EXTERNAL_C like this,
%Procedure PAS_EXTERNAL_C (X: code); %begin asmname _quote%x%_quote; %end;
Before macro expansion you would write
procedure Hello; %PAS_EXTERNAL_C (Hello);
After macro expansion you would get
procedure Hello; asmname 'Hello';
as required.
Frank Rubin