Path: utzoo!attcan!uunet!mcsun!cernvax!chx400!bernina!neptune!c!mneerach From: mneerach@iiic.ethz.ch (Matthias Ulrich Neeracher) Newsgroups: comp.sys.mac.programmer Subject: Re: Str255 in C Message-ID: <21046@neptune.inf.ethz.ch> Date: 14 Jan 91 13:25:30 GMT References: <1991Jan13.210327.9613@ux1.cso.uiuc.edu> Sender: news@neptune.inf.ethz.ch Reply-To: mneerach@iiic.ethz.ch Organization: Departement Informatik, ETH, Zurich Lines: 23 In article <1991Jan13.210327.9613@ux1.cso.uiuc.edu>, ml27192@uxa.cso.uiuc.edu (lanett mark) writes: > jeffb@cs.fau.edu (Jeffrey Boser) writes: > > { > > Str255 s; > > > s = "\pThis wont work."; > > } > In C the name of an array is actually a pointer to it, so if you _did_ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > assign "names" you would really only be assigning the pointer (i.e. a=b will > make a and b both point to b, while real string a is lost). This is only true for the name of an array *parameter* to a procedure. In the present case, your statement is wrong. The assignment doesn't work because C has no array assignment. Matthias ----- Matthias Neeracher mneerach@iiic.ethz.ch "These days, though, you have to be pretty technical before you can even aspire to crudeness." -- William Gibson, _Johnny Mnemonic_