Actually sprintf("%t",x) gets converted to basetype(x) internally as an optimization, if anyone cared to know. The comparision to typeof isn't all that good, since basetype returns a string while typeof returns a type.
constant tre = typeof(3); tre fyra=4;
Compiler Error: 1:Bad type in assignment. Compiler Error: 1:Expected: { tre = int(3..3) } Compiler Error: 1:Got : int(4..4)
/ Martin Nilsson (hehe Torgny)
Previous text:
2002-11-28 20:31: Subject: CHANGES line of the day
In the interest of getting the CHANGES worked out sooner or later I will try to (with the eager help of members of this conferance) work out at least one undescribed entry in the CHANGES per day. Depending on current level of boredom there might be more than one entry in a day.
1st entry:
basetype()
Suggested entry, added to "Language additions":
o basetype(foo) Returns the basic type of foo as opposed to typeof(foo) that returns the full type. Also available as sprintf("%t", foo).
/ Peter Bortas