Expression CHOP expression syntax

Hi,
the documentation is lacking in defining CHOP Expression syntax. See examples:

works:
if($V>5,1,0)
does not work:
if(me.inputVal>5,1,0)
works:
me.inputVal
does not work:
me.inputVal if me.inputVal<255 else me.inputVal*0.039

So what gives? What is the proper syntax if I need to have a condition inside expression and I want to reference other operators or itself by python. Also I did not find where “$V” comes from. I understand that it represents value but where is the documentation for this?

some things mixed up here.

I assume you are talking about an Expression CHOP?
The documentation is here: https://docs.derivative.ca/Expression_CHOP

Where did you find your examples? Because since many years the expression language is pure Python.
Perhaps you found some ancient T-script tutorial, as that is where that $V would be from.

Anyway you can write whatever works in Python as long as it’s a oneliner.
For instance:
me.inputVal if me.inputVal<10 else 10*me.inputVal

or

me.inputVal if op("null1")[0] > 5 else 20*me.inputVal

There is an example for the Expression CHOP which is using all the features you’re asking for (“condition inside expression and I want to reference other operators or itself by python”) to be found in Help->Operator Snippets,