fix-orchestra icon indicating copy to clipboard operation
fix-orchestra copied to clipboard

[Score DSL] add binary condition syntax

Open donmendelson opened this issue 2 years ago • 0 comments

Frequently, applications have binary conditional logic that depends on a value. The logic is soften something like “If this field is present, echo the value. Otherwise, set a default value.”

Programming languages derived from C have what’s called the ternary operator. It has the form: condition ? <expression if true> : <expression if false>. Example :(marks >= 40) ? "passed" : "failed"

Similarly, Excel has an If function. Example: =IF(C2>B2,”Over Budget”,”Within Budget”)

I propose that such an “if” expression be added to Score DSL in a manner consistent with its syntax.

donmendelson avatar Nov 17 '22 14:11 donmendelson