IPB

> Unary Arithmetic Operators
Форум
Загрузка...
 
Час быка
Час быка
Карта Интернета
Internet Map
Яндекс.Метрика

Language:
Русский
English

 Unary Arithmetic Operators


   Operator Operation     Operand types  Result type
   +        Sign identity integer type   integer type
                          real type      real type
   -        Sign negation integer type   integer type
                          real type      real type

Note: Any operand whose type is a subrange of an ordinal type is treated as if it were of the ordinal type.

If both operands of a +, -, *, div, or mod operator are of an integer type, the result type is of the common type of the two operands.

If one or both operands of a +, -, or * operator are of a real type, the result type of the is Real in the {$N-} state or Extended in the

If the operand of the sign identity or sign negation operator is of an integer type, the result is of the same integer type. If the operand is of a real type, the result type of the is Real or Extended.

The value of  X/Y  is always of type Real or Extended regardless of the operand types. An error occurs if Y is 0.

The value of  I div J  is the mathematical quotient of I / J, rounded in the direction of 0 to an integer-type value. An error occurs if J is 0.

The mod operator returns the remainder obtained by dividing its two operands:

   I mod J = I - (I div J) * J

The sign of the result of mod is the same as the sign of I. An error occurs if J is 0.

 
 К началу страницы 
Тэги: Operators +
 

Код для вставки: :: :: :: ГОСТ ::
Поделиться: //
 


-
Хостинг предоставлен компанией "Веб Сервис Центр" при поддержке компании "ДокЛаб"