Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!dmmg1176 From: dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) Newsgroups: comp.sys.mac.programmer Subject: Re: Str255 Message-ID: <1991Jan31.165511.20409@ux1.cso.uiuc.edu> Date: 31 Jan 91 16:55:11 GMT References: <1991Jan31.061259.20093@ux1.cso.uiuc.edu> <3869@uakari.primate.wisc.edu> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 22 bin@primate.wisc.edu (Brain in Neutral) writes: >How about: > gBartender->SetCmdText(cmdCopy, (StringPtr) "\pCopy Picture"); >The disparity comes about because literal "...." constructs are >considered char arrays, whereas Str255 are array of unsigned chars. >This is really a pain, but necessary, because otherwise operations >using the length byte of Str255 variables are dangerous in that you >can get sign-extension if the length of the string is > 127. >-- >Paul DuBois >dubois@primate.wisc.edu Thanks. I tried casting with Str255, and it didn't like that. I'll try StringPtr. -- David M. Marcovitz | internet: marcovitz@uiuc.edu Computer-based Education Research Lab | dmmg1176@uxa.cso.uiuc.edu University of Illinois | novanet: marco / cca / cerl