Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!cc.utah.edu!kofoid From: KOFOID@cc.utah.edu Newsgroups: comp.sys.mac.hypercard Subject: passing param's by reference Message-ID: <83758@cc.utah.edu> Date: 9 Aug 90 16:23:27 GMT Lines: 34 HyperTalk does not allow parameter passing by reference. If I understand correctly, version 2 will be the same. This makes it difficult to write generalized handlers for modular use. I can imagine two ways to do this, but I'm not sure either is possible: 1) Pass a handle to the container being used as a parameter and dereference it within the script body. The problem is finding the handle. There is no legitimate way in HT of determining this. 2) Pass the body of a script to an XCMD, which then executes it and sets the appropriate containers to values calculated within the script. However, the available glue routines only allow XCMDs to execute singe HT expressions. I am not at all sure how one could extend this to the execution of a script body, without first writing an entire HT interpreter, which essentially recreats HyperTalk within an XCMD! Does anybody have any ideas? Please don't tell me to use functions! The point is to be able to manipulate data in a highly generalized fashion *at the source*, very much like Pascal var parameters. Cheers, Eric. __________________________________________________________________ | (801) 581-3592 | | Snail: Eric Kofoid; Dept. Biology, U. of Utah; SLC, UT 84112 | | Fast: bi.kofoid%science@utahcca (BitNet) | | Faster: bi.kofoid@science.utah.edu (InterNet) | |Fastest: kofoid@bioscience.utah.edu (InterNet -> QuickMail) | | | | -- The University of Utah is blameless for anything I've said -- | |__________________________________________________________________|