Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!zephyr.ens.tek.com!vice!bobb From: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Newsgroups: comp.lang.pascal Subject: Re: Help me (problems with strings) Message-ID: <7310@vice.ICO.TEK.COM> Date: 18 Apr 91 16:34:02 GMT References: <1991Apr18.020517.7767@javelin.sim.es.com> Reply-To: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Organization: Tektronix, Inc., Beaverton, OR. Lines: 21 In article <1991Apr18.020517.7767@javelin.sim.es.com> tpehrson@javelin.sim.es.com writes: >I'm getting the error "Type mismatch" in the following: > >Procedure writ(txt:string); > var huh:char; > begin; > for x:=1 to length(txt) do begin > huh:=copy(txt,x,1); <---error occurs here Try huh := txt[i]; This is the simplest approach. If you're feeling lucky, you might try huh := char(copy(txt,x,1)), but my gut feeling is that you'll still have the type mismatch error. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Bob Beauchaine bobb@vice.ICO.TEK.COM C: The language that combines the power of assembly language with the flexibility of assembly language.