4.Expressions - Expressions 1. Arithmetic Expression: - It...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Expressions
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
1. Arithmetic Expression: - It is composed of operands and arithmetic operations ( + , - , *, /, MOD). - Its result is a numeric value (e.g. 3 + 4 gives 7) - Operands may be numbers and/or identifiers that have numeric values e.g. x – y gives 4, if x is 6 and y is 2 x / 2 gives 6, if x 12 T MOD 2 gives 0 if T is any even number, and 1 if T is any odd number
Background image of page 2
2. Logical Expression: - It is called also Boolean expression . - It is composed from operands and operators. - Operands are identifiers that have logical values - Its result is a logical value ( true or false ) (see later). - Operators are logical: AND , OR, NOT e.g. X AND Y a AND b OR c where X, Y, a, b, c are defined logical
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3. Relational Expression : - It is composed from operands and operators. - Operands may be numbers and/or identifiers that have numeric values - Its result is a logical value ( true or false ). - Operators are relational operators: <, >, =, ≠, ≤, ≥ e.g. (a < b)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/23/2011 for the course CHEMICAL E 2 taught by Professor Hibasaadeh during the Spring '11 term at University of Jordan.

Page1 / 13

4.Expressions - Expressions 1. Arithmetic Expression: - It...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online