Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!lll-crg!gymble!umcp-cs!cvl!umd5.umd.edu!zben From: zben@umd5.umd.edu.UUCP Newsgroups: net.lang.c Subject: Re: WITH statement Message-ID: <1080@umd5.umd.edu> Date: Wed, 16-Jul-86 22:25:39 EDT Article-I.D.: umd5.1080 Posted: Wed Jul 16 22:25:39 1986 Date-Received: Thu, 17-Jul-86 02:31:16 EDT References: <1003@zog.cs.cmu.edu> <2366@umcp-cs.UUCP> Reply-To: zben@umd5.umd.edu.UUCP (Ben Cranston) Organization: University of Maryland, College Park Lines: 33 Summary: with rec_array[selector] do In article <2366@umcp-cs.UUCP> chris@maryland.UUCP (Chris Torek) writes: > (I have a feeling that `WITH' originally meant `Listen, compiler, > put a pointer to this here record into a machine register now, > because I am about to use it a whole bunch.') And well it might, if the subject record be selected from a record array. The Pascal compiler on the SperrySaur has a limit of something like five of these "nontrivial WITHs" to be open at any one time. The idea was to avoid repeating the same selector expression over and over again, and is akin to the C syntax: maskarray[selector] |= xbit; /* Set X bit in maskarray */ The ambiguous condition scares me too, and I think I could live much better with being able to take the address of the thing and then using it, like: recpointer := &recarray[selector]; ... recpointer^.foo := 1; recpointer^.bar := 2; While the & operator (find address) is highly non-standard Pascal, you can do much the same thing in legal C right now. Why mess with the language? Not only has UMD5 arisen as a MicroVax from its previous incarnation as an 11/44, but I am using a Macintosh Plus and MacKermit to type this in. Are we having fun yet? -- umd5.UUCP <= {seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben Ben Cranston zben @ umd2.UMD.EDU Kingdom of Merryland Sperrows 1100/92 umd2.BITNET "via HASP with RSCS"