Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod!uakari.primate.wisc.edu!bin From: bin@primate.wisc.edu (Brain in Neutral) Newsgroups: comp.sys.mac.programmer Subject: Re: Str255 in C Message-ID: <3757@uakari.primate.wisc.edu> Date: 15 Jan 91 20:25:57 GMT References: <1991Jan15.181224.4809@ux1.cso.uiuc.edu> Sender: bin@primate.wisc.edu Reply-To: bin@primate.wisc.edu Lines: 16 From article <1991Jan15.181224.4809@ux1.cso.uiuc.edu>, by ml27192@uxa.cso.uiuc.edu (lanett mark): > Well for the case 'Str255 a = "\pThis will work"' the \p is replaced with > the length count _and_ the string is still a null-terminated C string. > So you can do a strcpy and it will work for both Think and MPW. What happens when the stuff between the "\p and the other " is 255 characters long? What is sizeof (Str255)? Does it differ, depending upon circumstances? Consider the case of statically initialized structures, where the structure is an Inside Macintosh-defined type that contains a Str255 elements. Where does that terminating null byte go? On top of the next structure element? -- Paul DuBois dubois@primate.wisc.edu