Simple conditional operations can be carried out with the conditional operator (?:).
koşullu işlemler koşul operatörü (?:) aracılığıyla yapılabilir.
Basically, a conditional operator performs a decision test.
Temel olarak, koşullu işleç bir karar testi gerçekleştirmektedir.
The conditional operator operates much like in the language C.
/ Operatörler C dilindeki gibi çalışır.
The syntax for ternary conditional operator is
Ternary conditional operatörü ile göstermek gerekirse
The conditional operator is the only ternary operator the C language has.
Koşul operatörü (conditional operator/ ternary operator), C dilinin üç terimli tek operatörüdür.
First operand of the conditional operator.
İlk çalıştırma alıcıya aittir.
If we have only one operator in the body of the if-statement, the curly brackets denoting the body of the conditional operator may be omitted, as shown below.
if-deyiminin gövdesinde sadece bir komut varsa, koşullu işlecin gövdesini belirten kıvırcık parantezler, aşağıda gösterildiği gibi, atlanabilir (yazılmayabilir).