Modules without implementation

Frank Heckenbach frank at g-n-u.de
Sun Apr 20 17:08:20 CEST 2003


Emil Jerabek wrote:

> On Sun, Apr 20, 2003 at 01:11:37PM +0200, Frank Heckenbach wrote:
> > Gale Paeper wrote:
> > 
> > > Frank Heckenbach wrote:
> > > > 
> > > > One of the listed bugs of GPC was "modules without implementation".
> > > 
> > > Where is the bug listed?  It isn't listed under "Known bugs in
> > > GPC" at < http://www.gnu-pascal.de/gpc/Known-Bugs.html>.
> > >
> > > > However, if I understand EP correctly, this actually doesn't concern
> > > > `interface' modules (as in pmodtest.pas without the `implementation'
> > > > part):
> > > 
> > > If I understand the comment in pmodtest.pas correctly, EP always
> > > requires one and exactly one implementation module to be associated with
> > > an interface module.  Even if the module-block is empty (except for the
> > > required 'end'), there still must exist an implementation module to
> > > associate with an interface module.  This is what the "shall have
> > > exactly one" language in ISO 10206 requires. 
> > > 
> > > > What seems to be missing is this variant (no module-block at all),
> > > > and I'll add it in the next release (that's easy to do):
> > > > 
> > > > module fjf843m;
> > > > 
> > > > export fjf843m = all;
> > > > 
> > > > const OK = 'OK';
> > > > 
> > > > end.
> > > 
> > > I really don't see any need for this variant.  It isn't in any way
> > > conformant to ISO 10206 requirements and the only "value" of it is to
> > > save typing an 'end;'.  There are already enough problems with the
> > > gaggle of non-compatible, non-standard ISO 7185 based dialect variants
> > > so there is no need to create additional problems with non-standard ISO
> > > 10206 variants which serves no purpose other than to save typing *four* characters.
> > 
> > I meant that this form *is* according to EP:
> > 
> > : program­component = main­program­declaration `.'
> > :                     | module­declaration `.' .
> > : module­declaration = module­heading [ `;' module­block ]
> > :                    | module­identification `;' module­block .
> > : module­heading = `module' identifier [ interface­directive ]
> > :                   [ `(' module­parameter­list `)' ] `;'
> > :                   interface­specification­part
> > :                   import­part
> > :                   { constant­definition­part
> > :                   | type­definition­part
> > :                   | variable­declaration­part
> > :                   | procedure­and­function­heading­part }
> > :                   `end' .
> > 
> > Note the optional module-block in the first form of
> > module-declaration. So IIUIC, there are 3 kinds of "module
> > components": module headings with `interface' (aka interface
> > modules), module headings without `interface' and module
> > identifications (aka implementation modules).
> > 
> 
> Maybe I'm missing the point here, but: the second kind of module
> "components" _must_ include a module block (this doesn't follow
> from the BNF rules, but from the text of 6.11.1). 

You mean they write misleading BNF rules, only to clarify them in
they unusually clear and understandable "English" description?
Great! :-(

No wonder modules never got very popular if even the definition what
is a module is so incomprehensible ...

Frank

-- 
Frank Heckenbach, frank at 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: 51FF C1F0 1A77 C6C2 4482  4DDC 117A 9773 7F88 1707




More information about the Gpc mailing list