Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!sri-unix!sri-spam!mordor!lll-tis!ptsfa!ihnp4!alberta!ubc-vision!fornax!sfu_halley!dyck From: dyck@sfu_halley.cs.sfu Newsgroups: comp.lang.pascal Subject: Re: Pointer problem ? Message-ID: <61600004@sfu_halley> Date: Sat, 25-Jul-87 01:57:00 EDT Article-I.D.: sfu_hall.61600004 Posted: Sat Jul 25 01:57:00 1987 Date-Received: Sun, 26-Jul-87 02:36:57 EDT References: <254@askja.UUCP> Lines: 19 Nf-ID: #R:askja.UUCP:254:sfu_halley:61600004:000:984 Nf-From: sfu_halley.cs.sfu!dyck Jul 24 22:57:00 1987 >Can anyone tell me if this program fragment is supposed to compile or not. > | >program t; | Even though the first two type definitions have the same >type | RHS, section 6.4.1 of the Standard says that each > p1 = ^p1; | occurrence of a new-type (e.g. each of the two > p2 = ^p1; | occurrences of ^p1) shall denote a type that is distinct > p3 = ^p2; | from [the type denoted by] any other new-type. So p1 and >var p : p1; | p2 (and p3) denote distinct types. > r : p3; | The assignment-compatibility rules (section 6.4.6) as >begin | applied to pointer-types require that in the asmt-stmt, > p := r; | the variables denoted by p and r possess the same type. >end. | They don't, so the program violates the Standard. >-- | >Fridrik Skulason Univ. of Iceland, Computing Center > UUCP ...mcvax!hafro!askja!frisk BIX frisk | | Mike Dyck, Simon Fraser University, BC |