What kind of operator is =




















Chaining assignment operations in this way is useful for quickly and compactly initializing multiple variables to the same value. This single statement is a compact way of writing:. Unfortunately, there are more operators than there are symbol-keys on the keyboard available to represent them. This limitation implies that we must use some of the symbols to implement more than one operator. The compiler can tell which operator a character or pattern of characters represents by where it appears in a program.

Programmers can and must learn how to distinguish which operator each symbol represents based on its usage. You do this by focusing on where the symbols appear in each example program appearing in the text as you study it.

We don't have time to study all of the operators appearing in the following table, and we must delay our study of others until later chapters. Operators in the same group groups are separated by horizontal lines have the same precedence.

Right associative operators are evaluated right to left: e. Operator tables like the one above are quite common. Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true. Called Logical AND operator. If both the operands are non zero then then condition becomes true.

Called Logical OR Operator. If any of the two operands is non zero then then condition becomes true. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand.

Properties on the left side of the equal sign can only be those writable properties at run time. Description This operator provides the sums of two numbers.

Basic arithmetic operator used for addition; the result of an arithmetic operator is usually a numeric value. If one or both expressions are Null expressions, the result is Null. If both expressions are Empty, the result is an integer subtype. However, if only one expression is Empty, the other expression is returned unchanged as a result. Description This operator performs logical conjunction on two Boolean expressions. Description These basic arithmetic operators can be used in combination with other commands.

The result is a numeric value. Comments The results are expressed in numeric format. The basic mathematical operators that can be used in Epi Info are as follows:.

Arithmetic operators are shown in descending order of precedence. Parentheses can be used to control the order in which operators are evaluated. The default order, however, frequently achieves the correct result. While it is possible to do date math with dates considered as a number of days e. For doing date math, the following rules apply:. Comments Comparison operators are executed from left to right. There is no hierarchy of comparison operators.

For non-numeric variables, use NOT. Comments The results appear in the Output window. Use LIST to view the selected records. Description This operator reverses the True or False value of the logical expression that follows. Description This operator returns True if one or the other or both expressions are True. If either expression evaluates to True, OR returns True. If neither expression evaluates to True, OR returns False.



0コメント

  • 1000 / 1000