Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.6.2.17 $; site uiucdcsb.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxj!houxm!ihnp4!inuxc!pur-ee!uiucdcsb!davies From: davies@uiucdcsb.UUCP Newsgroups: net.lang Subject: Re: Orphaned Response Message-ID: <8900022@uiucdcsb.UUCP> Date: Sat, 26-Jan-85 01:39:00 EST Article-I.D.: uiucdcsb.8900022 Posted: Sat Jan 26 01:39:00 1985 Date-Received: Sun, 27-Jan-85 07:31:23 EST References: <2673@dartvax.UUCP> Lines: 30 Nf-ID: #R:dartvax:-267300:uiucdcsb:8900022:000:737 Nf-From: uiucdcsb!davies Jan 26 00:39:00 1985 boring!steven states that it is possible to statically insure that nil pointers are never dereferenced. The following program provides a simple counterexample to this claim: program noway(input,output); type pointer = ^rec; rec = record data : integer; next : pointer; end; var p : pointer; q : pointer; begin p := nil; while not eof(input) do begin new(q); read(q^.data); q^.next := p; p := q; end; writeln(p^.next^.next^.next^.data); end. In this program, whether the "writeln" dereferences a nil pointer is determined by the number of integers in the input data, and thus cannot be determined at compile time. Jim