Search the Community
Showing results for tags 'printf'.
-
Dear all, A simple looking question about how to pick up an @ttribute's value inside a MATRIX : 2@boo = set(1,2,3,4); printf("boo[0] : %g\n",@boo[0]); it doesn't work while it is working with vector or obviously with array. Saddly, i feel stucked, if needed to pick up one of these values, separatly. Humbly, all/any feedbacks are welcome even if i've dumbly mistaken myself (it could happen to anybody ), thank you all. cheers. alr77
-
Hi everyone ! I'm learning VEX (from CGwiki and Entagma) and I don't understand why the result of the following code is 0 whereas it should be 3... what did I misunderstand ? int myarray[] = {2, 3, 4, 5}; int foo = myarray[1]; printf("%i \n",i@foo); Thanks ! Alexandre
-
I'm confused about printf. I don't know c++ and so never had to use it before leaning vex. I'm wondering about all letters you can use for the arguments in the printf function. I've seen %f used for a float. %d also used for float (decimal i guess), %s for string, and %i for integer. the docs state: The conversion of the argument is specified by a single letter: g, f, s, d, x, c, p. it goes on to show: %g, %p, %c Print an integer float, vector, vector4, matrix3, matrix or string in "general" form. %f, %e, %E Print a float, vector, vector4, matrix3 or matrix in floating point form. The first example shows 3 argument types and 7 data types. Does this mean i can use any of the listed %letter arguments with any of the data types shown?
-
Dear all, Sorry if my question looks naive, as you're all surely usual with this : matrix reading /printing. But i'd like to "printf" it element by element. Usually, generally a matrix looks like : matrix M[r][c] -> then your iter through. eg : print(M[1][1]+"\n"); But here in Hou it is : matrix M Yes printf() prints the thing but the whole thing. Then, how to read elements one by one separatly, please? i humbly dunno. Am usual with this practice in other languages because Matrices could be used as a fantastic "Chest" to store values, compiling vectors pack, and on and on... So any advices to this practical question are welcome. Thank you a lot. Bests,
-
So I was writing some vex code for a scene Im working on, and while I was debugging the code to correct an issue I placed various printf() functions in the code to check the state of the attributes right after I made some changes to them, and I noticed that if I load an attribute in a variable and print it, modify the attribute, reload it in the same variable and then print the variable out again, it wont show the newer value if the loading&printing process is done in the same wrangle node of where the attribute was modified. Here's an example scene wich exactly recreates my scenario. Am I missing something stupid here? Test_attribute.hipnc
-
Hi This may be really stupid but I was working on a volume wrangle, and I noticed that the printf() function does not work on this kind of wrangle node... Is it just me or am I making some kind of stupid mistake? In the pic the node to the left prints nothing, instead of the node of the right (wich has the same code), wich actually prints "Hello" to the Houdini console.
-
Hi, guys. My friend find a strange VEX problem. When we first create a 10*10 grid, and use a point wrangle run points level(detail level works correct) with: if(@Frame == 2){ printf("%s\n", "ss"); } The console show "ss", it was a right way. But if we change the grid to 40* 40, or much bigger. The console show two or more the two lines. Does it concerned with the number of threads?