Andrew Clarke wrote:
Although polymorphism should replace the technique, the Icon code I'm
converting asks these types of questions:
if type(l_tag) == "R_Container" | \l_tag.isstatic then
but from testing the following code:
record Record(x)
class Class(y)
end
procedure main()
r := Record()
c := Class()
write(type(r))
write(type(c))
end
I get the following result:
Record
Class__state
The section on name munging says that CLASS__state is reserved for all
classes, but I find it intriguing that this exact string pops out. I was
actually expecting either "Class" or possibly "class Class"
Is there any rational explanation for the string returned, and is there any
other function or accessor (such as .type or .class) provided to return a
more "normal" string for the type?
You can use the Type(var) procedure defined in the Utils package found
at http://tapestry.tucson.az.us/unicon (or subclass the Class class
found there). I'm also pretty sure that there are other approaches
in Robert Parlett's contributions to Unicon.
--
Steve Wampler [EMAIL PROTECTED]
The gods that smiled upon your birth are laughing now. -- fortune cookie
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group