Mirror of
forum.nim-lang.org
index
2834 :: Inbuilt vs Custom types
[2017-03-08T11:44:33+01:00]
View Orginal
geekboy
(orginal)
[2017-03-08T11:44:33+01:00]
view original
Is there a way to find out if a variable is of inbuilt type or a custom (user defined) type? TIA
Araq
(orginal)
[2017-03-08T11:58:51+01:00]
view original
Please use
nimsuggest
with your favourite editor. I move my mouse cursor over an identifier to see where it comes from and you can do the same. :-)
geekboy
(orginal)
[2017-03-08T13:00:33+01:00]
view original
@Araq
thanks for the suggestion :). I already use nimsuggest. But I wanted to check in code if a variable is of inbuilt or custom type.
Araq
(orginal)
[2017-03-08T13:39:02+01:00]
view original
Ah ok. Well what's a builtin type? In
system.nim
? In the stdlib? You can use
macros.getType
and friends for compiletime introspection.