13.07.2015 Views

Analysis of Structures - Baustatik-Info-Server

Analysis of Structures - Baustatik-Info-Server

Analysis of Structures - Baustatik-Info-Server

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.4. PRINT AND OUTPUT FORMATS Page 19The truth table for the AND operator ∧ is given as follows.True ∧ True = True (2.5)True ∧ False = FalseFalse ∧ True = FalseFalse ∧ False = FalseThe truth table for the OR operator ∨ is given as follows.True ∨ True = True (2.6)True ∨ False = TrueFalse ∨ True = TrueFalse ∨ False = False2.3.6 Membership OperatorsWith the membership operators you can check whether a value or an object is part <strong>of</strong> sequence <strong>of</strong> objects.Operator Comment Examplein is member x = 2 in (1,2,3) >>> Truenot in is not a member x = 2 not in (1,2,3) >>> False2.3.7 Identity OperatorsWith the identity operators you can check the identity <strong>of</strong> two objects.Operator Comment Exampleis is identical x = (1,2) >>> y = x >>> x is y >>> Trueis not is not identical x = (1,2) >>> y = x >>> x is not y >>> False2.4 Print and Output FormatsIf you want to print data into the console window, you have to think about formating. The formatingsequences are very similar to the formating sequences <strong>of</strong> the C printf function. The formating is a socalled escape sequence within a string, which is started with the % operator.The most common formats are the following.• formating an integerAn integer (independent <strong>of</strong> the data type) is formated by the escape %d for decimal representationand %x or %X for hexadecimal representation.• formating a floatA float is formated by the escapes %f, %e, %E, %g and %G2.12.2011

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!