conditional expression operator

German translation: Bedingungsoperator

GLOSSARY ENTRY (DERIVED FROM QUESTION BELOW)
English term or phrase:conditional expression operator
German translation:Bedingungsoperator
Entered by: Detlef Mahne (X)

04:57 Aug 25, 2008
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
dan_iel
India
Local time: 19:50
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 (X)
India
Local time: 19:50
Grading comment
Thanx!
4 KudoZ points were awarded for this answer



Summary of answers provided
5 +5Bedingungsoperator
Detlef Mahne (X)


  

Answers


38 mins   confidence: Answerer confidence 5/5 peer agreement (net): +5
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;



    Reference: http://www.imb-jena.de/~gmueller/kurse/c_c++/c_operbd.html
Detlef Mahne (X)
India
Local time: 19:50
Specializes in field
Native speaker of: Native in GermanGerman
PRO pts in category: 124
Grading comment
Thanx!

Peer comments on this answer (and responses from the answerer)
agree  sci-trans
33 mins
  -> Danke!

agree  Norbert Voelker
3 hrs
  -> Danke!

agree  Mihaela Boteva
3 hrs
  -> Danke!

agree  Ivana Zuppa-Baksa
4 hrs
  -> Danke!

agree  Kay Barbara
8 hrs
  -> Danke!
Login to enter a peer comment (or grade)



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.

KudoZ™ translation help

The KudoZ network provides a framework for translators and others to assist each other with translations or explanations of terms and short phrases.


See also:
Term search
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search