Leozard
Leozard
About Me
専門知識
Generalist
Connect
LOCATION
Cameroon
ウェブサイト
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Vex typeid seems to be a mystery 2024年3月18日7:58
Thanks Viklc. Trying that now.
Vex typeid seems to be a mystery 2024年3月15日14:39
Wow. Thanks Viklc. Would be nice to have that first function into some library(Like Python modules) that could be called in any wrangle node.
And your list of mapped ids seems to be exhaustive.
And your list of mapped ids seems to be exhaustive.
Vex typeid seems to be a mystery 2024年3月12日14:23
So I was in a situation where I had the verify the data type of some values using a printf statement. So, for the first time, I come across the typeid() function. Which returns integer numbers instead of words like float, integer, vector 2, etc. So I searched google to find out if there is correspondence list somewhere which can tell me what number corresponds to what datatype. Scarcely do I find anything. I was almost troubled, like: no one is ever checking the return type of vex values; Is there another way"
Sidefx help docs also seldom mention it. So question is: am I missing something?
Anyway I went on to create my little vex snippet to tell what what IDs are what. Basically
vector myvar;
printf(%s,typeid(myvar)); which returns 3
------------------------------------------------
vector myvar;
printf(%s,typeid(myvar)); which returns 13
Or
int myvar;
printf(%s,typeid(myvar)); which returns 0
------------------------------------------------
int myvar;
printf(%s,typeid(myvar)); which returns 10
or
float myvar;
printf(%s,typeid(myvar)); which returns 1
------------------------------------------------
int myvar;
printf(%s,typeid(myvar)); which returns 11
and so on...
As you can see, there is a pattern where if the Id of a type is n, the array of that that same type will be 1n
Sidefx help docs also seldom mention it. So question is: am I missing something?
Anyway I went on to create my little vex snippet to tell what what IDs are what. Basically
vector myvar;
printf(%s,typeid(myvar)); which returns 3
------------------------------------------------
vector myvar;
printf(%s,typeid(myvar)); which returns 13
Or
int myvar;
printf(%s,typeid(myvar)); which returns 0
------------------------------------------------
int myvar;
printf(%s,typeid(myvar)); which returns 10
or
float myvar;
printf(%s,typeid(myvar)); which returns 1
------------------------------------------------
int myvar;
printf(%s,typeid(myvar)); which returns 11
and so on...
As you can see, there is a pattern where if the Id of a type is n, the array of that that same type will be 1n