To get the c-type name of a type, you can do this:
print Debug::repr_type[utiny]; endl;
which prints out:
_us2
Is there any way to get the felix type name? I've got a function I'd
like to add this to a regression but I can't get it to work:
proc p[T with Show[T]] (t:T) {
print $ "type: " + Debug::repr_type[T]; endl;
print $ "str: " + (str t); endl;
print $ "repr: " + (repr t); endl;
endl;
}
p true;
p false;
p 1t;
p 1ut;
p 1s;
...
Where it should print out:
type: bool
str: true
repr: true
type: bool
str: false
repr: false
type: tiny
str: 1
repr: 1t
type: utiny
str: 1
repr: 1ut
And etc.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language