Path: utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!purdue!haven!adm!xadmx!MATHRICH@umcvmb.missouri.edu From: MATHRICH@umcvmb.missouri.edu (Rich Winkel UMC Math Department) Newsgroups: comp.lang.pascal Subject: (re:)**3 function return value Message-ID: <18654@adm.BRL.MIL> Date: 10 Mar 89 20:34:11 GMT Sender: news@adm.BRL.MIL Lines: 20 Arghhh! I apologize for using so much bandwidth for this problem. It's my fault for not giving a good example of what I want to do. Let me try again: function what(var where:string):string; begin what:=where; delete(what,5,10); end; Ok, so I need to: 1. Use a VAR parameter to the function to avoid stacking a large variable, 2. Avoid modifying the var parameter to the function, 3. Avoid defining temp variables (which use up stack space) 4. Do an operation which involves modifying a copy of the var parameter. If this was assembler, it would be easy to just use the same stack buffer as both a work area and a return buffer. Is there some way to do the same in pascal? Thanks for your indulgence. Rich Winkel