Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mcvax!inria!axis!philip From: philip@axis.fr (Philip Peake) Newsgroups: comp.lang.pascal Subject: Re: Pointer problem ? Message-ID: <259@axis.fr> Date: Fri, 24-Jul-87 03:58:42 EDT Article-I.D.: axis.259 Posted: Fri Jul 24 03:58:42 1987 Date-Received: Sat, 25-Jul-87 18:03:44 EDT References: <254@askja.UUCP> Organization: Axis Digital, Paris Lines: 25 Summary: Not if its real pascal. In article <254@askja.UUCP>, frisk@askja.UUCP (Fridrik Skulason) writes: | Can anyone tell me if this program fragment is supposed to compile or not. | Turbo Pascal refuses to compile it, but VAX/VMS Pascal does. | | program t; | type | p1 = ^p1; | p2 = ^p1; | p3 = ^p2; | | var p : p1; | r : p3; | begin | p := r; | end. With a REAL pascal compiler this should NOT compile. P1, p2 ans p3 are different types. The whole idea of typing things is to catch errors in programming. It may be obvious to you and to the compiler that these things are in fact identical, but if that is so LOGICALY within your program, why did you give them different types. I suggest that you ask DEC to mend their compiler. Philip