Home RAP

Variable belonging to a set with IN command

edited September 2015 in RAP
Hello all,
I would like to perform a control on a variable value before some calculation.
The variable could have many acceptable values (e.g. 1, 2 and 3) that for me are all the same in this control, such as:

IF variable IN (1, 2, 3) then
Execute a calculation
Execute another calculation

Looks like the IN command is not accepted in RAP, and I would like to avoid a list of IF...OR conditions: is there any accepted syntax?

Thank you very much,

--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-


  • edited September 2015
    Hi Fabio,

    RAP does not support the 'in' command however it does fully support case

    case of
    1, 2, 3: //Execute Calculation
    //Execute Calculation

    Another option would be to create a passthru function that performs the
    special IN condition and returns a result. See the RAP demos for
    examples of how to create passthru function for RAP.

    Best Regards,

    Nico Cizik
    Digital Metaphors
This discussion has been closed.