[comp.lang.pascal] Conformant Arrays and ISO

jwb@LINDENTHAL.CAE.RI.CMU.EDU (John Baugh) (04/26/89)

Pardon me if this has been discussed before --- I'm new to
comp.lang.pascal.

Do unix-based Pascals (generally) implement the ISO Level 1
standard (which includes conformant arrays)?  I am
particularly interested in Apollo's Pascal compiler, which
I know nothing about.  Any information regarding this, or
other aspects of Pascal programming on the Apollo, will
be appreciated.

John Baugh (jwb@cive.ri.cmu.edu)
-- 

art@buengc.BU.EDU (A. R. Thompson) (04/28/89)

In article <4824@pt.cs.cmu.edu> jwb@LINDENTHAL.CAE.RI.CMU.EDU (John Baugh) writes:
>Pardon me if this has been discussed before --- I'm new to
>comp.lang.pascal.
>
>Do unix-based Pascals (generally) implement the ISO Level 1
>standard (which includes conformant arrays)?  I am
>particularly interested in Apollo's Pascal compiler, which
>I know nothing about.  Any information regarding this, or
>other aspects of Pascal programming on the Apollo, will
>be appreciated.

The Pascal-2 compiler from Oregon Software implements this um feature.
Actually, the cantankerous (oops, I meant conformant) array feature is a
real disaster that never should have been foisted on an unsuspecting
public.  I haven't got the time to list the most salient of the many
objections but it never should have happened.  The schema array feature of
the new Extended Pascal should cure most of the problems with conformant
arrays.

wnielsen@lambda.Sun.COM (Walter Nielsen) (04/29/89)

>Pardon me if this has been discussed before --- I'm new to
>Do unix-based Pascals (generally) implement the ISO Level 1
>standard (which includes conformant arrays)?  I am
>particularly interested in Apollo's Pascal compiler, which
>I know nothing about.  Any information regarding this, or
>other aspects of Pascal programming on the Apollo, will
>be appreciated.
>

Apollo Pascal does not implement conformant arrays.  To pass
arbitrary length arrays, they put in an extension to the formal
parameter specification called 'UNIV' which inhibits types checking
between the formal and actual parameters.

Sun Pascal implements both conformant arrays and UNIV parameter 
specfication.  I don't know about other Unix Pascal compilers.

-Walter

reeder@reed.UUCP (Doug Reeder) (04/30/89)

    Pc, Berkeley Pascal, does not implement conformant array parameters. A
more  serious problem is the case-sensitivity, a direct violation of the rules.
It's a compiler I'd rather not work with.


-- 
Doug Reeder                         USENET: ...!tektronix!reed!reeder
Institute of Knowledge, Jinx        BITNET: reeder@reed.BITNET
"There is a better way."         from ARPA: tektronix!reed!reeder@berkeley.EDU
       -Alaine of Lyndar            Box 971 Reed College,Portland,OR 97202

weyrich@csun1.UUCP (Orville Weyrich) (05/01/89)

From article <2699@buengc.BU.EDU>, by art@buengc.BU.EDU (A. R. Thompson):
> In article <4824@pt.cs.cmu.edu> jwb@LINDENTHAL.CAE.RI.CMU.EDU (John Baugh) writes:
> > [Question about] ISO Level 1 standard (which includes conformant arrays)
> 
> The Pascal-2 compiler from Oregon Software implements this um feature.
> Actually, the cantankerous (oops, I meant conformant) array feature is a
> real disaster that never should have been foisted on an unsuspecting
> public.  I haven't got the time to list the most salient of the many
> objections but it never should have happened.  The schema array feature of
> the new Extended Pascal should cure most of the problems with conformant
> arrays.

Personally, I think that the conformant 
array feature is a considerable
improvement over the ISO level 0.  
It is not as nice as the features 
provided by Ada, but it seems to be more 
efficient, which is in keeping
with the minimalist design philosophy of Pascal.

Would someone care to fill me in on the problems with conformant arrays?

Where can I find out about the schema array feature, 
and what is "Extended Pascal" ?
-- 
Orville R. Weyrich, Jr.          | UUCP    : ...gatech!csun1!weyrich
Department of Computer Science   | INTERNET: weyrich@csun1.cs.uga.edu
University of Georgia            |
Athens, GA 30602 USA             | MA BELL : (404) 542-1082

art@buengc.BU.EDU (A. R. Thompson) (05/01/89)

In article <160@csun1.UUCP> weyrich@csun1.UUCP (Orville Weyrich) writes:
>From article <2699@buengc.BU.EDU>, by art@buengc.BU.EDU (A. R. Thompson):
>> In article <4824@pt.cs.cmu.edu> jwb@LINDENTHAL.CAE.RI.CMU.EDU (John Baugh) writes:
>> > [Question about] ISO Level 1 standard (which includes conformant arrays)
>> 
>> The Pascal-2 compiler from Oregon Software implements this um feature.
>> Actually, the cantankerous (oops, I meant conformant) array feature is a
>> real disaster that never should have been foisted on an unsuspecting
>> public.  I haven't got the time to list the most salient of the many
>> objections but it never should have happened.  The schema array feature of
>> the new Extended Pascal should cure most of the problems with conformant
>> arrays.
>
>Personally, I think that the conformant 
>array feature is a considerable
>improvement over the ISO level 0.  
>It is not as nice as the features 
>provided by Ada, but it seems to be more 
>efficient, which is in keeping
>with the minimalist design philosophy of Pascal.
>
>Would someone care to fill me in on the problems with conformant arrays?
>

They rely on structural compatibility rather than name compatibility.
That means you cannot name a conformant array "supertype" and use it in a
parameter list.

Any conformant array parameter that is to be passed to a procedure called
from another procedure must have the conformant array declared as a var
parameter.

There is no way of restricting the conformant arrays to specific instances
of arrays in question.  Any array that fits in the bounds is ok.

Example: procedure p(a:array [lo..hi:integer] of whathaveyou).  Any array
whose upper and lower bounds are integers in the subrange lo..hi is
accepted.  This flies in the face of the security mechanisms of name
compatibility.

The idea that conformant arrays are trying to implement is a good one, but
the spec is abominable.

>Where can I find out about the schema array feature, 
>and what is "Extended Pascal" ?

Contact Bob Dietrich at Intel (sorry don't have his address at hand).