Categorii: Tot - adición - operadores - lógicos - relacionales

realizată de Dalys _E 3 ani în urmă

263

Expresiones y operadores

El texto aborda diversos tipos de operadores utilizados en programación, clasificándolos en varias categorías. Los operadores relacionales permiten comparar valores para determinar la igualdad o desigualdad.

Expresiones y operadores

Clasificados en:

Operadores relacionales

Los operadores de igualdad están predefinido para todos los tipos no limitados.
function "=" (Left, Right : T) return Boolean function "/="(Left, Right : T) return Boolean

Operadores de máxima prioridad

Los operadores de máxima prioridad son: el operador de cálculo del valor absoluto, definido para cualquier tipo numérico, T1, el operador de negación lógica, definido para cualquier tipo booleano, modular o array monodimensional de componentes booleanos, T 2, y el operador de exponenciación, definido para cualquier tipo entero, T3, o para cualquier tipo real en coma flotante, T4.
function "abs"(Right : T) return T function "not"(Right : T) return T function "**"(Left : T; Right : Natural) return T function "**"(Left : T; Right : Integer'Base) return T

Operadores Mulplicativos

Los operadores de multiplicación y división están predefinidos entre diversas combinaciones de enteros y reales.
function "*" (Left, Right : T) return T function "/" (Left, Right : T) return T function "*"(Left : T; Right : Integer) return T function "*"(Left : Integer; Right : T) return T function "/"(Left : T; Right : Integer) return T function "*"(Left, Right : root_real) return root_real function "/"(Left, Right : root_real) return root_real function "*"(Left : root_real; Right : root_integer) return root_real function "*"(Left : root_integer; Right : root_real) return root_real function "/"(Left : root_real; Right : root_integer) return root_real function "*"(Left, Right : universal_fixed) return universal_fixed function "/"(Left, Right : universal_fixed) return universal_fixed

Operadores unitarios de adición

Los operadores unarios de adición preferidos para cualquier tipo numérico, T, son la identidad y negación.
function "+"(Right : T) return T function "–"(Right : T) return T

Operadores binarios de adición

Los operadores de adición predefinidos para cualquier tipo numérico, T.
function "+"(Left, Right : T) return T function "–"(Left, Right : T) return T

Operadores lógicos

Están predefinidos para cualquier tipo, T, que designe una booleano, modular, o un array.
function "and"(Left, Right : T) return T function "or" (Left, Right : T) return T function "xor"(Left, Right : T) return T

Expresiones y Operadores

Operadores

Expresiones

Una expresión es una combinación de operadores y operandos de cuya evaluación se obtiene un valor.