Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ucla-cs.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!teddy!panda!talcott!harvard!seismo!hao!hplabs!sdcrdcf!trwrb!trwrba!cepu!ucla-cs!dimare
From: dimare@ucla-cs.UUCP
Newsgroups: net.lang,net.lang.pascal
Subject: Comparing pointers in Pascal
Message-ID: <3161@ucla-cs.ARPA>
Date: Fri, 11-Jan-85 02:42:05 EST
Article-I.D.: ucla-cs.3161
Posted: Fri Jan 11 02:42:05 1985
Date-Received: Sun, 13-Jan-85 09:02:11 EST
Organization: UCLA Computer Science Department
Lines: 30
Xref: watmath net.lang:1237 net.lang.pascal:183

I just ran into a problem with pointers in Pascal: I have
two lists of pointers, and I need to find the intersection
of them. Due to the nature of the problem, it's cheaper to
keep these lists ordered.

However, Pascal complains when I try to campare two pointer
variables with operators different than = and <>:

 > Script started on Thu Jan 10 23:30:45 1985
 > Warning: no access to tty; thus no job control in this shell...
 > e[2:1] c p.p; pi p.p
 > program blah (input, output);
 > var
 >   x,y: ^integer;
 > begin
 >   new(x);
 >   if x end.
 > Thu Jan 10 23:27 1985  p.p:
 > E 6 - < not allowed on pointers - only allow = and <>
 > e[2:2] 
 > script done on Thu Jan 10 23:31:03 1985

I'm not trying to do arithmetic with pointers, I only need
to order them. I think this restriction is excessive. Is there
a good reason for it? Would Modula-2 behave in the same way?
Is it that Berkely Pascal is a wacko?

	Adolfo
	      ///