* Note that the features below have been added to DirectRT v2010 (including the beta) and are not active in v2008 and prior versions. For a related solution for use in v2006 and subsequent versions, see http://www.empirisoft.com/support/showthread.php?t=4734
----------------------
The functionality of the 'rand()' feature is now extended. As you've noted, the following syntax does not work: rand((x,y),(x2,y2),(x3,y3)),1
This error arises due to the fact that the software can't quite figure out how to split the values up. The software would parse the above text normally by using the comma as an identifier. If the software were to do so in a scenario for the input you've provided, you would split up the above choices in the following way: '(x' , 'y)' , '(x2' , 'y2)' , '(x3' , 'y3)' - This wouldn't be too helpful.
To remedy this problem, I've made it so that commas you don't want parsed can be identified by using the following: '' (not ")
For example, you would be able to present the desired syntax above as: rand((x''y),(x2''y2),(x3''y3)),1 - rather than - rand((x,y),(x2,y2),(x3,y3)),1
Next, I worked on the second issue. Your second issue noted that you want to be able to use the same rand() values that have previously been generated. This can now be done by using the new 'write' and 'read' syntax. Let's say you have the following: rand(1,2,3,4)
If you want the result of this operation stored, simply write something such as: rand(write:Capulet|1,2,3,4)
The value 'Capulet' is a variable that you've created. This variable can have any name. The above function selects a random value out of the four listed above, and then writes that value to both the experiment and the variable 'Capulet'. The variable 'Capulet' can be re-read at any time by using the following syntax: rand(read:Capulet) . Rather than creating a new random value, this will simply make a pointer to our variable 'Capulet' and use the value that is stored within. Both read and write values can be located anywhere within the spreadsheet. You can read a variable even if it's located further down in the experiment.
Please let me know if you have any additional questions or if I can help in any way.




Reply With Quote