Skip to main content

Expression shown in a tutorial does not work

Problem

Expression shown in tutorials does not work in RailClone 3 and above.

Solution

RailClone 3 updated the expressions syntax meaning that some older tutorials now longer work as written. In most cases, it is a simple case of adding a return at the beginning of the expression and terminating it with a semicolon ';'.

For more information about other changes to expression see this detailed post.

For example. In a tutorial we use the expression Input1/Input2*100. Heres how you convert it to RailClone 3+ format:

  • In RailClone 2

    Input1/Input2*100

  • In RailClone 3 would read

    Return Input1/Input2*100;

Another change is when testing for equality in If statement in RailClone 3, it is now necessary to use double equals (==).

  • In RailClone 2

    if(Input1=1,5,9)

  • In RailClone 3

    return if(Input1==1,5,9);

Related Entries: