🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.oberon
Article #1306

(no subject)

#1306
From: MWeiss
Date: Wed, 10 Apr 1996 08:25
41 lines
1219 bytes
Execution of Test.Do in the following sample module generates a 
"NIL dereference read " trap on Oberon/F at the line indicated 
although in Oberon for Windows V4, it works all fine. 

MODULE Test;

TYPE
	T0 = POINTER TO T0desc;
	T0desc = RECORD
		next: T0;
	END;
	
	T1 = POINTER TO T1desc;
	T1desc = RECORD(T0desc)
	END;
	
PROCEDURE Do*;
	VAR x: T1; next: T0;
BEGIN
	NEW(x);
	x :=  x.next(T1); (* a TRAP is generated here *)
END Do;

END Test.

It seems that type-guarding the pointer x.next which happens to 
have the value NIL at execution time causes the problem. Did 
anybody else encounter this problem before? 

I am using Oberon/F v 1.1 for Windows.

Thank you in advance for any hints. 

Martin Weiss
Applied Physics Faculty
University of Eindhoven
The Netherlands



 
Technical Details
Message-ID: <4kfra6$k1t@tuegate.tue.nl>
Path: arc1-ca.pugleaf.net!tuegate.tue.nl!usenet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!tuegate.tue.nl!usenet
From: MWeiss <MartinW@ctrl.phys.tue.nl>
Newsgroups: comp.lang.oberon
Subject: (no subject)
Date: 10 Apr 1996 08:25:42 GMT
Organization: TUE
Message-ID: <4kfra6$k1t@tuegate.tue.nl>
NNTP-Posting-Host: nr28.ctrl.phys.tue.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 1.1N (Windows; I; 32bit)