Login or register (free and only takes a few minutes) to participate in this question.You will also have access to many other tools and opportunities designed for those who have language-related jobs (or are passionate about them). Participation is free and the site has a strict confidentiality policy.
English to German translations [PRO] Tech/Engineering - Computers: Software / C/C++ programming tool | | English term or phrase: conditional expression operator | The conditional expression operators are the operator pair ? : and they are used rather like an abbreviated if....else construct.
For instance, the following statement sets the variable minimum_x_y equal to the minimum value of x and y.
minimum_x_y = (x
How do you translate "conditional expression operator" into German?
Thanx in advance! |
| dan_ielKudoZ activityQuestions: 42 (none open) Answers: 0 India
| Local time: 16:13
|
| | Bedingungsoperator | Explanation: Programmiersprache C/C++
Bedingungsoperator
Folgender ternärer Operator steht zur Verfügung:
? :
Der Operator besitzt 3 Operanden, die durch ? bzw. : voneinander getrennt werden:
operand1 ? operand2 : operand3
bedingung ? ausdruck1 : ausdruck2
Die Anwendung kann zum Beispiel in der folgenden Weise erfolgen:
variable = bedingung ? ausdruck1 : ausdruck2;
variable muß einen skalaren Datentyp besitzen.
Der Wert von variable wird in Abhängigkeit von bedingung festgelegt:
Ist bedingung erfüllt, dann erhält variable den Wert von ausdruck1, anderfalls wird der Wert von ausdruck2 zugewiesen.
Beispiel:
x = ( a > b ) ? 0 : 1;
entspricht
if ( a > b )
x = 0;
else
x = 1;
|
| Selected response from:
Detlef Mahne India Local time: 16:13
| Grading comment Thanx! 4 KudoZ points were awarded for this answer |
| |
| Discussion entries: 0 |
|---|
Automatic update in 00:
|
| |