🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #965

PIM3/PIM4 and JPI M2

#965
From: Pat Terry
Date: Mon, 23 Jul 1990 04:07
93 lines
2632 bytes
 > Hello Pat:
 > 
 >     Could you provide me with a list of PIM3/PIM4 descrepancies within JPI 
 > M2 2.00?

I guess it's hard to categorise.  JPI will probably argue that the  
differences are "extensions", not "violations" of PIM.  

So I guess GOTO is not a violation of PIM.

But here are a few that I think are violations.

I mentioned the use of IMPORT instead of EXPORT from a module nested
within an implementation module already.  That is the worst example, perhaps.

 DEFINITION MODULE a;
    PROCEDURE y;
  END a.

 IMPLEMENTATION MODULE a;
   MODULE (*inner*) x;
    (*standard*) EXPORT y;
    (*JPI*) IMPORT y;
      PROCEDURE y;
      ...

Also you don't need, so far as I remember, an EXPORT from a local module.  You  
can just use Localmodule.ItsIdentifier outside LocalModule to look at anything.


    (* local*) MODULE d;
      (* no import or exports *)
      VAR x : INTEGER;
    END d;

    BEGIN
      d.x := 6  (* should be illegal*)

If you have 

DEFINITION MODULE a;
  FROM x IMPORT y;
 ...
END a.

then in PIM I think you have to write

IMPLEMENTATION MODULE a;
  FROM x IMPORT y (*again*);
 ...

but in JPI you do not.

If you have

 DEFINITION MODULE a;
   TYPE b = (c,d,e);
  END a;

 (*another*)  DEFINITION MODULE x;
    FROM a IMPORT b;
    TYPE y = b;
  END x.

then, in JPI, in 

IMPLEMENTATION MODULE x

you cannot refer to c or d or e as you should be able to do.
(Mind you, lots of them have this wrong)

In JPI BYTE, WORD, ADR and ADDRESS are standard identifiers, but they should be  
imported from SYSTEM (if only to "brand" the source code non portable).  If  
this is an "extension" it is a silly one, and not in the "spirit" of SYSTEM!

In JPI the type casting of the form CARDINAL(g), INTEGER(g), REAL(h) is not  
"casting" or coercion at all, but conversion (like using VAL.

There are probably others.  As i think of more i'll try to remember to post  
them.

Hope this helps

Pat
 




--  
uucp: uunet!m2xenix!puddle!5!494!4.101!Pat.Terry
Internet: Pat.Terry@p101.f4.n494.z5.fidonet.org
Technical Details
Message-ID: <2028.26AAA196@puddle.fidonet.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!p101.f4.n494.z5.fidonet.org!Pat.Terry

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!p101.f4.n494.z5.fidonet.org!Pat.Terry
From: Pat.Terry@p101.f4.n494.z5.fidonet.org (Pat Terry)
Newsgroups: comp.lang.modula2
Subject: PIM3/PIM4 and JPI M2
Message-ID: <2028.26AAA196@puddle.fidonet.org>
Date: 23 Jul 90 04:07:23 GMT
Sender: ufgate@puddle.fidonet.org (newsout1.26)
Organization: FidoNet node 5:494/4.101 - Settler City Fido, Grahamstown RSA
Lines: 93