Tipos escalares como parámetros formales genéricos
Explicación
Un tipo escalar puede pasarse como parámetro genérico, especificando su
categoría (discreto, entero con signo, entero modular, real en coma flotante,
real en como fija o real decimal).
Sintaxis
formal_discrete_type_definition ::= (<>)
formal_signed_integer_type_definition ::= range <>
formal_modular_type_definition ::= mod <>
formal_floating_point_definition ::= digits <>
formal_ordinary_fixed_point_definition ::= delta <>
formal_decimal_fixed_point_definition ::= delta <> digits
<>
Ejemplo
generic
type Discreto is (<>);
type Entero is range <>;
type Modular is mod <>;
type RealFlot is digits <>;
type Real_Fijo is delta <>;
type Decimal is delta <> digits <>;
Créditos