🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #1161

Re: Programming Questions!

#1161
From: Andy DeFaria
Date: Wed, 19 Sep 1990 16:01
29 lines
1533 bytes
>/ hpclapd:comp.lang.modula2 / a1157@mindlink.UUCP (Reece Markowsky) /  5:45 pm  Sep 16, 1990 /
>Modula II is a lot like pascal in its constructs. It does, however, have
>stronger typing.  In pascal you have used UNITS (correct?) well in modula II,
>the INTERFACE is put in what is called a DEFINITION MODULE, and the
>IMPLEMENTATION is placed correspondingly in a IMPLEMENTATION MODULE.  I like
>this and think it better exemplifies the idea of

>"information hiding".... ie... can you really say that pascal supports
>information hiding when you can scroll down 10 lines to see its
>implementation!!!

I agree  that  I  like Modula 2's   implementation of seperate  compilation
better than Pascal's.  Obviously  this  was added on  to Pascal.  What I've
seen done  to hide the IMPLEMENTATION is   to contain  it in  include files
and then not distribute the include files so you have something like:

Unit FOO;

Interface
   
Const
   Exported_Constant = 'BAR';

   Procedure FOO_BAR (Input_Parm : Integer; Output_Parm : Real);

Implementation
{$I INCLUDE\FOO.PAS}

End.
Technical Details
Message-ID: <940003@hpclapd.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpcc05!hpcc01!hpcuhb!hpcllla!hpclisp!defaria@hpclapd.HP.COM
References: <INFO-M2%90091711095359@UCF1VM.BITNET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpcc05!hpcc01!hpcuhb!hpcllla!hpclisp!defaria@hpclapd.HP.COM
From: defaria@hpclapd.HP.COM (Andy DeFaria)
Newsgroups: comp.lang.modula2
Subject: Re: Programming Questions!
Message-ID: <940003@hpclapd.HP.COM>
Date: 19 Sep 90 16:01:09 GMT
References: <INFO-M2%90091711095359@UCF1VM.BITNET>
Organization: Hewlett-Packard Calif. Language Lab
Lines: 29