Dear All 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 regards Hari __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
vanam srihari kumar wrote:
Is it possible to have export clause at the end of module/program
No. In modules, it comes first in the interface, and programs do not export as all. (If you want to export something, put it in a module, not in the program.)
in gpc version 2.1 as my porting will becomes much easier
Why? Some more explanations/examples might enables us to help better. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8
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. -- Waldek Hebisch hebisch@math.uni.wroc.pl
participants (3)
-
Frank Heckenbach -
vanam srihari kumar -
Waldek Hebisch