Wade, you've been getting some very interesting suggestions from the group, which I don't intend to try to out-do (!). I will mainly add that a similar reference concept was done as an assignment in a graduate course on Icon Implementation at U. of Arizona around 1989 or so. The implementation has changed quite a bit, but the design raised lots of issues, e.g. how to support ref(L[i]) or ref(t["this"]), etc. Notes from this course might be useful if I or someone else in that class could dredge them up. But, I am not offering to go looking for it just now, fifteen year old stuff might effectively be lost or unusable at this point.
WB> I found the assignment code in runtime/oasgn.r but I can't immediately see WB> how I can tell it if a non-structure type is supposed to be referenced. In working with variables there are two operations you would need to keep consistent: assignment and dereference. Both of this operations start from variable references, which are descriptors with a pointer flag set, which point at other descriptors where an actual variable's value is stored. For variables X and Y to both produce descriptors which point at the same location, you would at least be *internally* (in the C code) introducing an extended pointer-like data type; a way to store in Y the fact that it is an alias for X; making Y basically a variable reference. But at the source language level one can avoid adding an explicit type if one wishes. The blue Icon implementation book might be very helpful to you on this. It seems like the Variable reference flag in descriptors is the one you want to understand and extend or modify in order to implement a ref() operator. > I thought we could have a new type that would do the trick... > But I can't find where the types are listed et al. The implementation has types listed in various points, descriptor type codes are in src/h/rmacros.h, but there are several other places where the current set of built-in types come up and which have to be extended to add a new type. There is or was an Icon Project Document on adding types to the language, I probably can find a copy if Icon Project doesn't have it around any more. Clint ------------------------------------------------------- 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