Nico D. Posted October 25, 2005 Share Posted October 25, 2005 Hi, Im reading about Houdini's expressions, and reading the reference I cannot find an array data type... I found a Vector() function that creates an array of floats, but How to create an array of strings ? Quote Link to comment Share on other sites More sharing options...
Jason Posted October 25, 2005 Share Posted October 25, 2005 Hi,Im reading about Houdini's expressions, and reading the reference I cannot find an array data type... I found a Vector() function that creates an array of floats, but How to create an array of strings ? 22112[/snapback] I'm afraid not. If your strings have no spaces in each token, then you can use one long string and pull out an "element" using arg(). Hscript has about the same power as CShell. If you need something more powerful, it's suggested that you go out to Java, Python or PERL. Hope this helps, Jason Quote Link to comment Share on other sites More sharing options...
Nico D. Posted October 25, 2005 Author Share Posted October 25, 2005 I'm afraid not. If your strings have no spaces in each token, then you can use one long string and pull out an "element" using arg().Hscript has about the same power as CShell. If you need something more powerful, it's suggested that you go out to Java, Python or PERL. Hope this helps, Jason 22113[/snapback] THANKS Jason, For now I will use arg(). Not the best, but I can extract words from my string. ( I hope Houdini implements arrays in next versions...) Quote Link to comment Share on other sites More sharing options...
crunch Posted October 25, 2005 Share Posted October 25, 2005 Hi,Im reading about Houdini's expressions, and reading the reference I cannot find an array data type... I found a Vector() function that creates an array of floats, but How to create an array of strings ? 22112[/snapback] There's an arcane form of variable expansion which can be used to simulate arrays. for i = 1 to 10 set var$i = `rand($i)` end for i = 1 to 10 echo ${var$i} end The contents of the {} are expanded and used to form the variable name for the other $ expansion. This is in hscript of course... You might be able to use these in expressions, though probably in a limited sort of fashion. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.