Skip to main content

Questions tagged [conditional]

For questions about conditionals, language constructs that enable the execution of specific code based on certain conditions.

6 votes
5 answers
3k views

One beneficial feature of Rust is that loop, the unconditional looping statement, allows so-called "returning break", ...
Dannyu NDos's user avatar
  • 1,485
0 votes
1 answer
430 views

So, as per my previous question, I added the support for the ternary conditional operator ?: into my PicoBlaze assembler written in JavaScript for compile-time ...
FlatAssembler's user avatar
1 vote
0 answers
244 views

ECMAScript and C have a totally different nature. Certain syntactic features are cryptic in C and don't fit exactly into ECMAScript dialects. For example, I don't think the following: ...
Hydroper's user avatar
  • 1,047
20 votes
10 answers
4k views

Novices writing in mainstream languages often don't realise that conditions like x < y are expressions which can occur anywhere an expression is syntactically ...
CPlus's user avatar
  • 10.5k
12 votes
7 answers
2k views

One problem that is hard to make not at least somewhat repetitive is if there is code that needs to be executed in a certain order, and the intermediate code is unconditional but first and last code ...
CPlus's user avatar
  • 10.5k
4 votes
9 answers
3k views

There are some languages that support ternary operator. There are Python, C, JavaScript, PHP. In languages like C and JavaScript, the syntax is like this: ...
чистов_n's user avatar
12 votes
2 answers
736 views

Thus far, I see two things that can go wrong when implementing the ?: (ternary conditional) operator: PHP famously incorrectly implemented the ...
FlatAssembler's user avatar
18 votes
15 answers
2k views

The ternary "if" operator is a syntactic construct for returning one of two values based upon a boolean condition. In most C-family languages its syntax resembles ...
Ginger's user avatar
  • 2,707