Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

1.1k questions

1.2k answers


543 users

0 votes

The binary operators have the following order:

Where in this order is the Shannon operator (a?b:c) placed?

When doing exercises I stumbled across this formula:

Which operator has precedence? d|a or a?d:(c->a) ?

in * TF "Emb. Sys. and Rob." by (380 points)

1 Answer

0 votes
Best answer

Interesting question, isn't it? However, there is no need to determine where the conditional operator belongs in that list, since we always write it with delimiters.

You cannot write something like a?b:c; it would be a syntax error since the brackets are mandatory here. As a consequence, it is always clear what the preference is. For example:

  • (a?b:c)&d is a conjunction
  • (a?b:c&d) is a conditional

by (166k points)
selected by

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jun 2, 2020 in * Other Teaching Fields by wei (190 points)
+1 vote
1 answer
asked Aug 18, 2020 in * Other Teaching Fields by Eichi (200 points)
+3 votes
1 answer
Imprint | Privacy Policy