Variable and Operator

Forums ProRealTime English forum ProBuilder support Variable and Operator

Viewing 3 posts - 1 through 3 (of 3 total)
  • #9935

    Hi,

     

    Is it possible to use a variable to return an operator (or also a string).  Example of part of code below:

    For this opVAR would be a variable set in ‘Variable optimization’ and myOperator could be used elsewhere in the code where I wanted to check different results based on less than or greater than.

    Thanks

     

    #9941

    Hi Paul
    Great question – math operators can’t be used as variables.

    You could try and code the conditions to +1 or -1 from the myoperator variable based on prior conditions and take it from there. If that makes sense.

    Cheers

    1 user thanked author for this post.
    #9980

    Thanks grizzly… yep, will rewrite code and use conditions as you mentioned.

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login