🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #1573

Re: multiple implementations

#1573
From: Tim Channon
Date: Fri, 16 Oct 1992 00:49
48 lines
2485 bytes
> The answer to the original question, though, depends very much on the
> environment supplied with the compiler.  The obvious solution is
> to have three files:
>     STACK.DEF
>               starts with "DEFINITION MODULE Stack;"
>     STACK1.MOD
>               starts with "IMPLEMENTATION MODULE Stack;"
>     STACK2.MOD
>               starts with "IMPLEMENTATION MODULE Stack;"
> 
> ...

> Now that I've started using TopSpeed M2, the whole structure collapses,
> for two reasons:

It is indeed a nuisance.

(*# pragma(implementation=>off) *)

and use explicit project file link with the relevant precompiled 
implementation modules might work but I haven't tried it. This is after all 
how people operate who do not possess the library source.

Further pragmas and project file directives can sort out all sort of horrid 
problems eg. a program which uses multi-language and third party libraries can 
be done. 

I find that I am increasingly using complex project files where the 
do-it-fo-you cannot work.

The documentation doesn't seem to help eg. some of the C compatibility 
directives did not work, nothing happened and no error msgs. Worked just fine 
when placed in the definition file! Obvious in hindsight.
Try experimenting with the underscore directive.

There is also the method using conditional compilation. Look at the assembler 
lib source for lots of examples.

>  (b) the TopSpeed system won't even accept the file names I used above,
>      since it requires a match between the source file name and the module
>      name (rather than the more logical approach of requiring a match
>      between the module name and the symbol file name).

I like this.

  TC. 
    E-mail: tchannon@black.demon.co.uk or tchannon@cix.compulink.co.uk
                                
Technical Details
Message-ID: <719221787snx@black.demon.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!know!hri.com!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!uknet!pavo.csi.cam.ac.uk!pipex!demon!black.demon.co.uk!tchannon
References: <1992Oct14.115616.1@wombat.newcastle.edu.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!know!hri.com!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!uknet!pavo.csi.cam.ac.uk!pipex!demon!black.demon.co.uk!tchannon
From: tchannon@black.demon.co.uk (Tim Channon)
Newsgroups: comp.lang.modula2
Subject: Re: multiple implementations
Message-ID: <719221787snx@black.demon.co.uk>
Date: 16 Oct 92 00:49:47 GMT
References: <1992Oct14.115616.1@wombat.newcastle.edu.au>
Sender: usenet@gate.demon.co.uk
Organization: null
Lines: 47
ReplyTo: tchannon@black.demon.co.uk
X-Mailer: cppnews $Revision: 1.18 $