Jump to content

Formula node question


Recommended Posts

Posted

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)

Posted

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

Posted

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...

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.