Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!hacgate!ashtate!dbase!awd From: awd@dbase.A-T.COM (Alastair Dallas) Newsgroups: comp.databases Subject: Re: Is this what's happening ? Summary: Parameter passing in dBASE Message-ID: <1991Feb2.070733.7358@dbase.A-T.COM> Date: 2 Feb 91 07:07:33 GMT References: <1991Jan31.040806.5135@csun.edu> Organization: Ashton-Tate, Inc. Lines: 34 Parameter passing in dBASE is always by reference in the case of simple memvars and always by value in the case of expressions. In your example: a = "this is a test" do icky with a ? a return procedure icky parameter foo foo = 1 return You will find that the top-level code prints 1, at least in dBASE IV. To pass parameters by value (generally better programming practice) you can do as little as enclose them in parentheses: a = "this is a test" do icky with (a) ? a && will print "this is a test" no matter what return Internally, dBASE creates a local alias which references the parameters which are passed by reference when it processes the PARAMETERS command. How you return from the procedure does not affect the operation. Of course, if you're using any random xBASE product ... ;-) /alastair/