Tudor Posted June 3, 2008 Report Share Posted June 3, 2008 Observer Pattern GOOP.zip I am trying to use formula node to solve a problem, i have to show a message on screen if a number is higher than aother something like this : int32 c; if (a>40) { c= "the value of a is ", a , "and is higher than 40" ; } is it possible? thanks in advance (i've attached a photo) Quote Link to comment
jgcode Posted June 3, 2008 Report Share Posted June 3, 2008 QUOTE (Tudor @ Jun 2 2008, 04:22 PM) Observer Pattern GOOP.zip I am trying to use formula node to solve a problem, i have to show a message on screen if a number is higher than aothersomething like this : int32 c; if (a>40) { c= "the value of a is ", a , "and is higher than 40" ; } is it possible? thanks in advance (i've attached a photo) Alternative solution? http://lavag.org/old_files/monthly_06_2008/post-10325-1212398470.png' target="_blank"> Quote Link to comment
Tudor Posted June 3, 2008 Author Report Share Posted June 3, 2008 Yes, thank you, I am aware of this solution, but I was trying to make it with formula node, but I guess there is no character variable, only integer Quote Link to comment
lraynal Posted June 3, 2008 Report Share Posted June 3, 2008 Perhaps if you add a substraction in your formula node like: y = a-40, then you watch the result of "y" outside the formula node with the solution of jgcode ! You can get what you want easily... Quote Link to comment
Yair Posted June 3, 2008 Report Share Posted June 3, 2008 If you really want to do this using the formula node, you can try declaring the output as a U8 array and using that as the string. To easily convert the string, you can use the String to Byte Array primitive and either use that as an input or as a constant inside the formula node. You can then use Byte Array to String on the output to convert it. Of course, I don't think the formula node is able to do something like printf anyway, so you will be doing a considerable part of the code outside the formula node. Quote Link to comment
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.