Within the CDS family of languages we have CXL, the CDS Expression Language. In the context of CDS models and queries, CXL brings the ability to use expressions for describing calculations, declaring conditions, and more, all of which enriches the CDS model and helps us focus on the domain model.
In CXL we think about path expressions, functions, literals and operators.
Operators are often referred to according to the number of operands they take:
not to negate something)+ to add two values)There's an operator supported by CXL referred to as case-when-then, which expands in full syntax to case when ... then ... else ... end (there's a possibility to repeat the when ... then ... structure too, but that's beside the point here).
The pure form of this operator takes three operands (a condition, and two alternative values), and also has a supported syntactical equivalent which is found in many other languages such as JavaScript, and is often written as ?: for short.
If "unary" is the name for an operator that takes one operand, "binary" for one that takes two, what is the name for an operator that, like case-when-then, takes three?
This is a question from the June Developer Challenge on CAP Knowledge. And don't forget: always submit your answer as a hash, on its own - read the Taking part section of the intro post for more info. At the end of today, this question will be updated with links to further reading on this topic.
Further info:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 103 | |
| 7 | |
| 6 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |