Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/13/84; site intelca.UUCP Path: utzoo!utcs!lsuc!pesnta!amd!intelca!cem From: cem@intelca.UUCP (Chuck McManis) Newsgroups: net.micro Subject: Turbo PASCAL quirk? Message-ID: <513@intelca.UUCP> Date: Wed, 20-Feb-85 12:10:58 EST Article-I.D.: intelca.513 Posted: Wed Feb 20 12:10:58 1985 Date-Received: Wed, 20-Feb-85 17:36:15 EST Distribution: net Organization: Intel, Santa Clara, Ca. Lines: 43 In writing a formatter for Turbo PASCAL programs I came upon the following feature/Bug and am not sure if it is "standard" or not. When the following code is executed (With the given declarations) Type Ident_Ptr = ^Ident; Ident = Record Name : String[127]; ID_Type : Ident_Type; References : Line_Ref; Nxt_Ident : Ident_Ptr; End; Var Sym_List : Ident_Ptr; ... With Sym_List^ Do Begin While Name <> '' do Begin Writeln(Name); Print_References(References); Sym_List := Nxt_Ident; End; (* While *) End; (* With *) What happens is that the line Sym_List := Nxt_Ident has no effect since the With statement seems to lock you into the VALUE of the Sym_List pointer when you enter the With statement. Is this standard PASCAL? I assumed, obviously incorrectly, that this code is equivalent to the same code without the With and with all of the record fields prefixed with Sym_List^. BTW, I am using Turbo PASCAL V2.0 on a CP/M 80 machine, I have not had the opportunity to try it on a MS-DOS machine yet. --Chuck -- - - - D I S C L A I M E R - - - {ihnp4,fortune}!dual\ All opinions expressed herein are my {qantel,idi}-> !intelca!cem own and not those of my employer, my {ucbvax,hao}!hplabs/ friends, or my avocado plant. :-}