vanam srihari kumar wrote:
Is it possible to have export clause at the end of module/program in gpc version 2.1 as my porting will becomes much easier
The compiler wants to _see_ the export clause at the beggining. You can use the proprocessor to write it at the end. Namely, insted of:
module m; export m = all; const c = 0;
end; { Module body } end .
Your can write (assuming your file is called "kumar.p"):
{$ifndef second_time} module kumar; {$csdefine second_time} {$include "kumar.p"} const c = 0;
end; { Module body } end . {$else} export kumar = all; {$endif}
If you want to write one-pass translator/generator then putting export clause in separate file may be the easiest option.