Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!bu.edu!dartvax!eleazar.dartmouth.edu!llama From: llama@eleazar.dartmouth.edu (Joe Francis) Newsgroups: comp.sys.mac.programmer Subject: MPW C++ (was: Re: Think C Objects in motion???) Summary: rhs then lhs?? Keywords: spam CHIC spam BEE GEES spam HELLEN REDDY spam SONNY & CHER spam Message-ID: <24353@dartvax.Dartmouth.EDU> Date: 18 Sep 90 02:59:11 GMT References: <1990Sep14.105646.23614@cunixf.cc.columbia.edu> <6988@dog.ee.lbl.gov> <63234@lanl.gov> Sender: news@dartvax.Dartmouth.EDU Organization: Dartmouth College, Hanover, NH Lines: 19 In article <63234@lanl.gov> egw%weaks@lanl.gov (Eric Wasserman) writes: >Page 192 of the Think C manual states: "It is OK to assign values to >instance variables, even when the expression on the right hand side may >move memory." In Think C the rhs is evaluated first (including any >memory shuffling) and THEN the handle reference on the lhs is evaluated. Some of the Apple C++ sample code that comes with MPW C++ shows temps being used for assignments when the rhs moves memory (then the temps are assigned to instance vars). Is this neccessary when your class is a HandleObject (obviously it's not neccessary when your object is local or allocated with malloc). Or does CFront guarentee rhs then lhs, in which case the sample code is just playing with my mind. I could look at intermediate code, but I wondered if anyone knew if MPW C++ guarenteed this. If I get no replies, I'll conduct some tests and summerize. ----------------------------------------------------------------------------- "Read My Lips: No Nude Texans!" - George Bush clearing up a misunderstanding