Capitulos de este wiki
  1. 1 Introducción
  2. 2 Historia
  3. 3 Manual de referencia
  4. 4 Instalación
  5. 5 Hola Mundo
  6. 6 Elementos del lenguaje
  7. 7 Tipos
  8. 8 Enteros
  9. 9 Enumeraciones
  10. 10 Coma flotante
  11. 11 Coma fija
  12. 12 Arrays
  13. 13 Strings
  14. 14 Registros
  15. 15 Registros discriminados
  16. 16 Registros variantes
  17. 17 Punteros a objetos
  18. 18 Punteros a subprogramas
  19. 19 Tipos derivados
  20. 20 Tipos etiquetados (orientación a objetos)
  21. 21 Subtipos
  22. 22 Objetos (variables y constantes)
  23. 23 Atributos
  24. 24 Expresiones
  25. 25 Operadores
  26. 26 Sentencias y estructuras de control
  27. 27 Subprogramas
  28. 28 Sobrecarga
  29. 29 Entrada/salida
  30. 30 Pragmas
  31. 31 Interfaz con otros lenguajes
  32. 32 Diseño y programación de sistemas grandes
  33. 33 Paquetes
  34. 34 Clausula use
  35. 35 Clausula with
  36. 36 Paquete Standard
  37. 37 Declaraciones
  38. 38 Ámbito
  39. 39 Visibilidad
  40. 40 Renombrado
  41. 41 La biblioteca Ada (unidades y subunidades)
  42. 42 Unidades de biblioteca
  43. 43 Unidades hijas
  44. 44 Subunidades
  45. 45 Compilación separada y dependiente
  46. 46 Tipos abstractos de datos
  47. 47 Tipos limitados
  48. 48 Unidades genéricas
  49. 49 Excepciones
  50. 50 Paquete Ada. Exceptions
  51. 51 Concurrencia
  52. 52 Tareas
  53. 53 Sincronización de tareas mediante puntos de entrada o citas (entry)
  54. 54 Aceptación de citas (accept)
  55. 55 Selección de citas (select)
  56. 56 Llamadas a punto de entrada complejas
  57. 57 Tareas dinamicas: creación dinamica de tareas (tipos t
  58. 58 Dependencia de tareas
  59. 59 Ejemplos de tareas
  60. 60 Programación distribuida con GLADE
  61. 61 Novedades de Ada 2005
  62. 62 Unidades predefinidas
  63. 63 Paquete Ada.Strings.Fixed
  64. 64 Paquete Ada.Strings.Unbounded
  65. 65 Paquete Ada. Text_IO
  66. 66 Paquete Ada.Text_IO.Editing
  67. 67 Paquete Ada. Float_Text_IO
  68. 68 Paquete Ada. Sequential_IO
  69. 69 Paquete Ada. Command_Line
  70. 70 Paquete Interfaces
  71. 71 Recursos en la Web

Curso de Ada - Paquete Standard

36 - Paquete Standard

[editar]
Curso gratis creado por José Alfonso Malo Romero. Extraido de: http://es.wikibooks.org/wiki/Programaci%C3%B3n_en_Ada_/_Introducci%C3%B3n
16 de Marzo de 2006

Paquete Standard


La unidad Standard es un paquete especial que contiene las declaraciones de todos los tipos predefinidos tales como Integer o Boolean.

En términos de compilación es como si todas las unidades tuviesen escrito antes de nada:

with Standard; use Standard;

También posee un paquete anidado llamado ASCII, que contiene las constantes que definen los caracteres tales como CR (retorno de carro) o LF (avance de línea). Escribiendo use ASCII; se pueden referenciar simplemente como CR. Sin embargo el estándar de Ada 95 no nos recomienda usar el paquete ASCII, porque éste queda obsoleto tras la definición del paquete Ada.Characters.Latin_1.

Especificación


La definición del paquete Standard según el manual de referencia de Ada:

package Standard is pragma Pure(Standard); type Boolean is (False, True); -- The predefined relational operators for this type are as follows: -- function "=" (Left, Right : Boolean'Base) return Boolean; -- function "/=" (Left, Right : Boolean'Base) return Boolean; -- function "<" (Left, Right : Boolean'Base) return Boolean; -- function "<=" (Left, Right : Boolean'Base) return Boolean; -- function ">" (Left, Right : Boolean'Base) return Boolean; -- function ">=" (Left, Right : Boolean'Base) return Boolean; -- The predefined logical operators and the predefined logical -- negation operator are as follows: -- function "and" (Left, Right : Boolean'Base) return Boolean; -- function "or" (Left, Right : Boolean'Base) return Boolean; -- function "xor" (Left, Right : Boolean'Base) return Boolean; -- function "not" (Right : Boolean'Base) return Boolean; -- The integer type root_integer is predefined. -- The corresponding universal type is universal_integer. type Integer is range implementation-defined; subtype Natural is Integer range 0 .. Integer'Last; subtype Positive is Integer range 1 .. Integer'Last; -- The predefined operators for type Integer are as follows: -- function "=" (Left, Right : Integer'Base) return Boolean; -- function "/=" (Left, Right : Integer'Base) return Boolean; -- function "<" (Left, Right : Integer'Base) return Boolean; -- function "<=" (Left, Right : Integer'Base) return Boolean; -- function ">" (Left, Right : Integer'Base) return Boolean; -- function ">=" (Left, Right : Integer'Base) return Boolean; -- function "+" (Right : Integer'Base) return Integer'Base; -- function "-" (Right : Integer'Base) return Integer'Base; -- function "abs" (Right : Integer'Base) return Integer'Base; -- function "+" (Left, Right : Integer'Base) return Integer'Base; -- function "-" (Left, Right : Integer'Base) return Integer'Base; -- function "*" (Left, Right : Integer'Base) return Integer'Base; -- function "/" (Left, Right : Integer'Base) return Integer'Base; -- function "rem" (Left, Right : Integer'Base) return Integer'Base; -- function "mod" (Left, Right : Integer'Base) return Integer'Base; -- function "" (Left : Integer'Base; Right : Natural) -- return Integer'Base; -- The specification of each operator for the type -- root_integer, or for any additional predefined integer -- type, is obtained by replacing Integer by the name of the type -- in the specification of the corresponding operator of the type -- Integer. The right operand of the exponentiation operator -- remains as subtype Natural. -- The floating point type root_real is predefined. -- The corresponding universal type is universal_real. type Float is digits implementation-defined; -- The predefined operators for this type are as follows: -- function "=" (Left, Right : Float) return Boolean; -- function "/=" (Left, Right : Float) return Boolean; -- function "<" (Left, Right : Float) return Boolean; -- function "<=" (Left, Right : Float) return Boolean; -- function ">" (Left, Right : Float) return Boolean; -- function ">=" (Left, Right : Float) return Boolean; -- function "+" (Right : Float) return Float; -- function "-" (Right : Float) return Float; -- function "abs" (Right : Float) return Float; -- function "+" (Left, Right : Float) return Float; -- function "-" (Left, Right : Float) return Float; -- function "*" (Left, Right : Float) return Float; -- function "/" (Left, Right : Float) return Float; -- function "" (Left : Float; Right : Integer'Base) return Float; -- The specification of each operator for the type root_real, or for -- any additional predefined floating point type, is obtained by -- replacing Float by the name of the type in the specification of the -- corresponding operator of the type Float. -- In addition, the following operators are predefined for the root -- numeric types: function "*" (Left : root_integer; Right : root_real) return root_real; function "*" (Left : root_real; Right : root_integer) return root_real; function "/" (Left : root_real; Right : root_integer) return root_real; -- The type universal_fixed is predefined. -- The only multiplying operators defined between -- fixed point types are function "*" (Left : universal_fixed; Right : universal_fixed) return universal_fixed; function "/" (Left : universal_fixed; Right : universal_fixed) return universal_fixed; -- The declaration of type Character is based on the standard ISO 8859-1 character set. -- There are no character literals corresponding to the positions for control characters. -- They are indicated in italics in this definition. See 3.5.2. type Character is (nul, soh, stx, etx, eot, enq, ack, bel, --0 (16#00#) .. 7 (16#07#) bs, ht, lf, vt, ff, cr, so, si, --8 (16#08#) .. 15 (16#0F#) dle, dc1, dc2, dc3, dc4, nak, syn, etb, --16 (16#10#) .. 23 (16#17#) can, em, sub, esc, fs, gs, rs, us, --24 (16#18#) .. 31 (16#1F#) ' ', '!', '"', '#', '$', '%', '&', ', --32 (16#20#) .. 39 (16#27#) '(', ')', '*', '+', ',', '-', '.', '/', --40 (16#28#) .. 47 (16#2F#) '0', '1', '2', '3', '4', '5', '6', '7', --48 (16#30#) .. 55 (16#37#) '8', '9', ':', ';', '<', '=', '>', '?', --56 (16#38#) .. 63 (16#3F#) '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', --64 (16#40#) .. 71 (16#47#) 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', --72 (16#48#) .. 79 (16#4F#) 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', --80 (16#50#) .. 87 (16#57#) 'X', 'Y', 'Z', '[', '\', ']', '^', '_', --88 (16#58#) .. 95 (16#5F#) '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', --96 (16#60#) .. 103 (16#67#) 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', --104 (16#68#) .. 111 (16#6F#) 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', --112 (16#70#) .. 119 (16#77#) 'x', 'y', 'z', '{', '|', '}', '~', del, --120 (16#78#) .. 127 (16#7F#) reserved_128, reserved_129, bph, nbh, --128 (16#80#) .. 131 (16#83#) reserved_132, nel, ssa, esa, --132 (16#84#) .. 135 (16#87#) hts, htj, vts, pld, plu, ri, ss2, ss3, --136 (16#88#) .. 143 (16#8F#) dcs, pu1, pu2, sts, cch, mw, spa, epa, --144 (16#90#) .. 151 (16#97#) sos, reserved_153, sci, csi, --152 (16#98#) .. 155 (16#9B#) st, osc, pm, apc, --156 (16#9C#) .. 159 (16#9F#) ' ', '¡', '¢', '£', '¤', '¥', '¦', '§', --160 (16#A0#) .. 167 (16#A7#) '¨', '©', 'ª', '«', '¬', '­', '®', '¯', --168 (16#A8#) .. 175 (16#AF#) '°', '±', '²', '³', '´', 'µ', '¶', '·', --176 (16#B0#) .. 183 (16#B7#) '¸', '¹', 'º', '»', '¼', '½', '¾', '¿', --184 (16#B8#) .. 191 (16#BF#) 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', --192 (16#C0#) .. 199 (16#C7#) 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', --200 (16#C8#) .. 207 (16#CF#) 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', --208 (16#D0#) .. 215 (16#D7#) 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', --216 (16#D8#) .. 223 (16#DF#) 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', --224 (16#E0#) .. 231 (16#E7#) 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', --232 (16#E8#) .. 239 (16#EF#) 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', --240 (16#F0#) .. 247 (16#F7#) 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ', --248 (16#F8#) .. 255 (16#FF#) -- The predefined operators for the type Character are the same as for -- any enumeration type. -- The declaration of type Wide_Character is based on the standard ISO 10646 BMP character set. -- The first 256 positions have the same contents as type Character. See 3.5.2. type Wide_Character is (nul, soh ... FFFE, FFFF); package ASCII is ... end ASCII; --Obsolescent; see J.5 -- Predefined string types: type String is array(Positive range <>) of Character; pragma Pack(String); -- The predefined operators for this type are as follows: -- function "=" (Left, Right: String) return Boolean; -- function "/=" (Left, Right: String) return Boolean; -- function "<" (Left, Right: String) return Boolean; -- function "<=" (Left, Right: String) return Boolean; -- function ">" (Left, Right: String) return Boolean; -- function ">=" (Left, Right: String) return Boolean; -- function "&" (Left: String; Right: String) return String; -- function "&" (Left: Character; Right: String) return String; -- function "&" (Left: String; Right: Character) return String; -- function "&" (Left: Character; Right: Character) return String; type Wide_String is array(Positive range <>) of Wide_Character; pragma Pack(Wide_String); -- The predefined operators for this type correspond to those for String type Duration is delta implementation-defined range implementation-defined; -- The predefined operators for the type Duration are the same as for -- any fixed point type. -- The predefined exceptions: Constraint_Error: exception; Program_Error : exception; Storage_Error : exception; Tasking_Error : exception; end Standard;

Manual de referencia de Ada


[editar]

12 opiniones

LEO

EXCELENTE QUISIERA BAJARLO PARA ESTUDIARLO
wnhjxssjjjaunxasxahqwedqbuxyquwdqd

qwkqwmnwhw wwbwyw wywbwsyw wywvwdwwuw wrwvwjwtsacxanya xyhwtsvabgsx atxnquxvaxc
Estudio psicopedagogia.

Hola en verdad cada aporte me esde gran interes asta para los que no dicen nada, pero en realidad hay que ayudar al mundo, ofrecindole mas que estos aportes, sin odtener nada a canbio ya que nedie quiere el mal para si mismo pero seamos mas humanos y no vemos por nosotros, ayudemos a las personas sin importar raza o lengua y te daras cuenta que tu odtendras ganancias sin hacer daño a nadie educando a los hijos de otros que numca tendran una oportunidad. Tn fe en ti mismo y no para que los demas te veamos, mas sin enbargo para que tu sientas que si eres muy capaz, dejala la relegion aparte, tus titulos, tus vicios, tu avaricia por ser mas grande que el mismo cesar; pero este mundo sin tu ayuda se enfermara pronto. Mirate tu mismo, mira a los presidentes del mundo compitiendo por el tajo mas grando; ellos creen que an ganado, pero no se dancuenta que una persona mas pequeña que ellos en la tierra sin dinero y sin oportuninades podra hacer la diferencia. Vamos azlo por ultimo asi como tu eres, de una forma ipocrita, con mentiras, con rabia omgolpes pero por ultimo te daras cuenta que tus hijos seran los dueños de tu esfuerso y seras muy importante, y tu odio se convertira en algo mas alla de la fe. Dios ayuda asta el mentiroso a adrse cuenta que el es el unico que se daña en esta competencia. Yo soy un hombre con miles de defectos, pero es logico que soy como tu de falso, y espero tu tanbien me ayudes a salir de este mundo de mentiras donde los afectados son tus hijos y los mios. Vamos ayuda tu mundo y este curso tendra sentido grandemente.
No esta mal.

La pena es que no está muy extendido y existen lenguajes mejores.
Me gusta.

Me gustó!.
1 2 3 | siguiente >

Cursos gratis relacionados con 'Curso de Ada'

El objetivo de este curso es aprender a programar en el lenguaje Ada, desde sus... Más »
Completo curso de Linux, un sistema operativo gratuito y de libre distribución inspirado en el... Más »
El más completo curso de Oracle.
La ortografía del español.
Linux es una gran herramienta, la uso desde hace años y se ha convertido en... Más »

Autor y licencia de 'Curso de Ada'


Curso gratis de José Alfonso Malo Romero. Extraido de: http://es.wikibooks.org/wiki/Programaci%C3%B3n_en_Ada_/_Introducci%C3%B3n CopyLeft
El contenido está disponible bajo los términos de GNU Free Documentation License
Licencia GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html
Este contenido ha sido recopilado por el equipo de Wikilearning. Todo el contenido recopilado se ha obtenido respetando y comunicando en nuestro site la licencia de cada fuente.
Wikilearning tiene permiso expreso por escrito de los autores para publicar los contenidos que ha extraído de otras webs, incluyendo su uso comercial.