Order check of 10 variables

Forums ProRealTime English forum ProBuilder support Order check of 10 variables

Viewing 4 posts - 1 through 4 (of 4 total)
  • #202784


    I have ten variables and I need to check they are in order.

    See below:

    The problem I’m having is the variables can be enabled or disabled by the user. If they are disabled, then their value is 0.

    Therefore, using the above test fails if any one of them isn’t enabled.

    Other than a convoluted bunch of if/ then statements, is there another way to achieve such a check?





    Can you make an  example of the value they may retain and which is the  order you need?




    Hi Roberto

    The values could be anywhere in the range say 1-2000.

    If the variable values are in order (depending on which are enabled) then they are not interesting. In order is as mentioned in first post so (var1 >= var2) and (var2 >= var3) etc.

    So if any of the lower ones are enabled they should always be a higher number than the higher ones.

    Sometimes they get completely out of order and it would be useful to know those orders without having to check manually but I think that is too complicated. Simply knowing when they are not in the primary order would be a start.

    I hope that makes sense? Let me know if not.

    Many thanks



    You need to use arrays, instead of variables.

    You will find useful info at https://www.prorealcode.com/topic/array-variables-availability-in-prorealtime/.


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

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