Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!mit-eddie!bu-cs!buengc!art From: art@buengc.BU.EDU (A. R. Thompson) Newsgroups: comp.lang.pascal Subject: Re: Conformant Arrays and ISO Message-ID: <2737@buengc.BU.EDU> Date: 1 May 89 16:53:21 GMT References: <2699@buengc.BU.EDU> <160@csun1.UUCP> Reply-To: art@buengc.bu.edu (A. R. Thompson) Followup-To: comp.lang.pascal Distribution: na Organization: Boston Univ. Col. of Eng. Lines: 47 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).