On Thu, 2004-02-12 at 04:29, Wade Bowmer wrote: > What I had in mind was a built-in function, ... > a := ref(b)
Hmmm, interesting idea, but... It cannot be done as a [builtin] function. Functions (along with procedures) have no special semantics in terms of the call - so by the time you get inside the function to build the reference, it's too late! It would have to be an operator. (And the changes to the lexical analyzer, parser, and semantic routines that that implies.) > > I found the assignment code in runtime/oasgn.r but I can't immediately see > how I can tell it if a non-structure type is supposed to be referenced. (My > initial thoughts were to have some other flag in the variable descriptor.) > So then I thought we could have a new type that would do the trick (I > haven't gotten as far as figuring out just how to change it back). But > I can't find where the types are listed et al. You'll have to introduce it as a new type - you'll have to do *much* more than set a flag, so it won't begin to fit in the descriptor. And, adding the new type means you have to make sure it's handled appropriately *everywhere*. I don't think the source code was ever set up to make it easy to add new types (that's what records let users do - add new 'types'). So, if you *really* want to do this, expect it to take a significant amount of time. (Of course, you'll know *a lot* about the Unicon source by the time you're done...). And, of course, the result has to 'fit' with the rest of the language... -- Steve Wampler <[EMAIL PROTECTED]> ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Unicon-group mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/unicon-group
