GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #10536

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: Grant Jacobs
Subject: porting Digital Pascal to Gnu Pascal -
Date: 14 Jun 2004, 09:13:05

>Markus Gerwinski wrote:
[snip]

>  > Digital Pascal allows this "structure" of the code via [global] 
>modules, and this code worked
>  > in the last release.
[snip]

>The "real" solution would, of course, be to declare all routines in
>the interface of that unit which implements it, and get rid of your
>`env' unit.
>Then, each unit can import (`uses') all other units (or only those
>that it actually needs) in the implementation part, so you can
>compile all interfaces first, then all implementations (or use GP
>which will do this automatically).

I happen to be porting code originally in DEC Pascal. This code has 
also gone via Turbo Pascal & something other thing I forget to GPC so 
it doesn't _quite_ apply. (In fact at some point I'm going to have to 
completely overhaul it as its been through one too many "quick ports" 
to my mind... :-) )

I'd second Franks suggestion of discarding the env unit; this is 
essentially how my code is structured, save for one nuisance I had to 
work around. For all the things declared [global] in any one module I 
make up a little global unit for that module, then use 'use' to bring 
them back in. This way they can be 'use'd by several units and 
maintain the overall code structure.

FWIW, this relates to 'uses inheritance' thing I raised ages ago 
which caused (too) much fuss. If interfaces where inherited you 
wouldn't have to do this, you'd just 'use' the module and that'd be 
it. But we've been through that and GPC doesn't do this :-)

Grant

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


In reply to

Author Subject Date
Mingeborg@aol.com porting Digital Pascal to Gnu Pascal - modules 7 Jun 2004, 11:07:09
Markus Gerwinski porting Digital Pascal to Gnu Pascal - modules 13 Jun 2004, 12:52:13
Mingeborg@aol.com porting Digital Pascal to Gnu Pascal - modules 13 Jun 2004, 11:47:44
Frank Heckenbach porting Digital Pascal to Gnu Pascal - 13 Jun 2004, 20:04:33

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).