1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>AARM95 - The Package Standard</TITLE>
<META NAME="Author" CONTENT="JTC1/SC22/WG9/ARG, by Randall Brukardt, ARG Editor">
<META NAME="GENERATOR" CONTENT="Arm_Form.Exe, Ada Reference Manual generator">
<STYLE type="text/css">
DIV.paranum {position: absolute; font-family: Arial, Helvetica, sans-serif; left: 0.5 em; top: auto}
TT {font-family: "Courier New", monospace}
DT {display: compact}
DIV.Normal {font-family: "Times New Roman", Times, serif; margin-bottom: 0.6em}
DIV.Wide {font-family: "Times New Roman", Times, serif; margin-top: 0.6em; margin-bottom: 0.6em}
DIV.Annotations {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-bottom: 0.6em}
DIV.WideAnnotations {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-top: 0.6em; margin-bottom: 0.6em}
DIV.Index {font-family: "Times New Roman", Times, serif}
DIV.SyntaxSummary {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-bottom: 0.4em}
DIV.Notes {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-bottom: 0.6em}
DIV.NotesHeader {font-family: "Times New Roman", Times, serif; margin-left: 2.0em}
DIV.SyntaxIndented {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-bottom: 0.4em}
DIV.Indented {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-bottom: 0.6em}
DIV.CodeIndented {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-bottom: 0.6em}
DIV.SmallIndented {font-family: "Times New Roman", Times, serif; margin-left: 10.0em; margin-bottom: 0.6em}
DIV.SmallCodeIndented {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-bottom: 0.6em}
DIV.Examples {font-family: "Courier New", monospace; margin-left: 2.0em; margin-bottom: 0.6em}
DIV.SmallExamples {font-family: "Courier New", monospace; font-size: 80%; margin-left: 7.5em; margin-bottom: 0.6em}
DIV.IndentedExamples {font-family: "Courier New", monospace; margin-left: 8.0em; margin-bottom: 0.6em}
DIV.SmallIndentedExamples {font-family: "Courier New", monospace; font-size: 80%; margin-left: 15.0em; margin-bottom: 0.6em}
UL.Bulleted {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-right: 2.0em; margin-top: 0em; margin-bottom: 0.5em}
UL.SmallBulleted {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
UL.NestedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-right: 4.0em; margin-top: 0em; margin-bottom: 0.5em}
UL.SmallNestedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-right: 8.0em; margin-top: 0em; margin-bottom: 0.5em}
UL.IndentedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-right: 8.0em; margin-top: 0em; margin-bottom: 0.5em}
UL.CodeIndentedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
UL.CodeIndentedNestedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-right: 8.0em; margin-top: 0em; margin-bottom: 0.5em}
UL.SyntaxIndentedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-right: 4.0em; margin-top: 0em; margin-bottom: 0.5em}
UL.NotesBulleted {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-right: 4.0em; margin-top: 0em; margin-bottom: 0.5em}
UL.NotesNestedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
DL.Hanging {font-family: "Times New Roman", Times, serif; margin-top: 0em; margin-bottom: 0.6em}
DD.Hanging {margin-left: 6.0em}
DL.IndentedHanging {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-top: 0em; margin-bottom: 0.6em}
DD.IndentedHanging {margin-left: 2.0em}
DL.HangingInBulleted {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-right: 2.0em; margin-top: 0em; margin-bottom: 0.5em}
DD.HangingInBulleted {margin-left: 4.0em}
DL.SmallHanging {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-top: 0em; margin-bottom: 0.6em}
DD.SmallHanging {margin-left: 7.5em}
DL.SmallIndentedHanging {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-top: 0em; margin-bottom: 0.6em}
DD.SmallIndentedHanging {margin-left: 2.0em}
DL.SmallHangingInBulleted {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
DD.SmallHangingInBulleted {margin-left: 5.0em}
DL.Enumerated {font-family: "Times New Roman", Times, serif; margin-right: 0.0em; margin-top: 0em; margin-bottom: 0.5em}
DD.Enumerated {margin-left: 2.0em}
DL.SmallEnumerated {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-right: 4.0em; margin-top: 0em; margin-bottom: 0.5em}
DD.SmallEnumerated {margin-left: 2.5em}
DL.NestedEnumerated {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-right: 2.0em; margin-top: 0em; margin-bottom: 0.5em}
DL.SmallNestedEnumerated {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
</STYLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFF0" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<P><A HREF="AA-TOC.html">Contents</A> <A HREF="AA-0-29.html">Index</A> <A HREF="AA-A.html">Previous</A> <A HREF="AA-A-2.html">Next</A></P>
<HR>
<H1> A.1 The Package Standard</H1>
<DIV Class="Paranum"><FONT SIZE=-2>1</FONT></DIV>
<DIV Class="Normal"> This clause outlines the specification of the
package Standard containing all predefined identifiers in the language.
<A NAME="I4781"></A>The corresponding package body is not specified by
the language.</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>2</FONT></DIV>
<DIV Class="Normal"> The operators that are predefined for the types
declared in the package Standard are given in comments since they are
implicitly declared. <A NAME="I4782"></A>Italics are used for pseudo-names
of anonymous types (such as <I>root_real</I>) and for undefined information
(such as <I>implementation-defined</I>). </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>2.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Ramification: </B>All of the
predefined operators are of convention Intrinsic. </FONT></DIV>
<H4 ALIGN=CENTER>Static Semantics</H4>
<DIV Class="Paranum"><FONT SIZE=-2>3</FONT></DIV>
<DIV Class="Normal" Style="margin-bottom: 0.4em"> The library package
Standard has the following declaration: </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>3.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Implementation defined: </B>The
names and characteristics of the numeric subtypes declared in the visible
part of package Standard.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>4</FONT></DIV>
<DIV Class="Examples"><TT><A NAME="I4783"></A><A NAME="I4784"></A><B>package</B> Standard <B>is</B><BR>
<B>pragma</B> Pure(Standard);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>5</FONT></DIV>
<DIV Class="Examples"><TT> <B>type</B> <A NAME="I4785"></A><A NAME="I4786"></A>Boolean <B>is</B> (False, True);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>6</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The predefined relational operators for this type are as follows:</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>7/1</FONT></DIV>
<DIV Class="Examples"><TT>{<I><A HREF="defect1.html#8652/0028">8652/0028</A></I>}
<BR>
-- <B>function</B> "=" (Left, Right : Boolean<U>'Base</U>) <B>return</B> Boolean;<BR>
-- <B>function</B> "/=" (Left, Right : Boolean<U>'Base</U>) <B>return</B> Boolean;<BR>
-- <B>function</B> "<" (Left, Right : Boolean<U>'Base</U>) <B>return</B> Boolean;<BR>
-- <B>function</B> "<=" (Left, Right : Boolean<U>'Base</U>) <B>return</B> Boolean;<BR>
-- <B>function</B> ">" (Left, Right : Boolean<U>'Base</U>) <B>return</B> Boolean;<BR>
-- <B>function</B> ">=" (Left, Right : Boolean<U>'Base</U>) <B>return</B> Boolean;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>8</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The predefined logical operators and the predefined logical</I><BR>
--<I> negation operator are as follows:</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>9/1</FONT></DIV>
<DIV Class="Examples"><TT>{<I><A HREF="defect1.html#8652/0028">8652/0028</A></I>}
<BR>
-- <B>function</B> "<B>and</B>" (Left, Right : Boolean<U>'Base</U>) <B>return</B> Boolean;<BR>
-- <B>function</B> "<B>or</B>" (Left, Right : Boolean<U>'Base</U>) <B>return</B> Boolean;<BR>
-- <B>function</B> "<B>xor</B>" (Left, Right : Boolean<U>'Base</U>) <B>return</B> Boolean;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>10/1</FONT></DIV>
<DIV Class="Examples"><TT>{<I><A HREF="defect1.html#8652/0028">8652/0028</A></I>}
<BR>
-- <B>function</B> "<B>not</B>" (Right : Boolean<U>'Base</U>) <B>return</B> Boolean;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>11</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The integer type root_integer is predefined.</I><BR>
--<I> The corresponding universal type is universal_integer.</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>12</FONT></DIV>
<DIV Class="Examples"><TT> <B>type</B> <A NAME="I4787"></A><A NAME="I4788"></A>Integer <B>is</B> <B>range</B> <I>implementation-defined</I>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>13</FONT></DIV>
<DIV Class="Examples"><TT> <B>subtype</B> <A NAME="I4789"></A>Natural <B>is</B> Integer <B>range</B> 0 .. Integer'Last;<BR>
<B>subtype</B> <A NAME="I4790"></A>Positive <B>is</B> Integer <B>range</B> 1 .. Integer'Last;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>14</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The predefined operators for type Integer are as follows:</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>15</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "=" (Left, Right : Integer'Base) <B>return</B> Boolean;<BR>
-- <B>function</B> "/=" (Left, Right : Integer'Base) <B>return</B> Boolean;<BR>
-- <B>function</B> "<" (Left, Right : Integer'Base) <B>return</B> Boolean;<BR>
-- <B>function</B> "<=" (Left, Right : Integer'Base) <B>return</B> Boolean;<BR>
-- <B>function</B> ">" (Left, Right : Integer'Base) <B>return</B> Boolean;<BR>
-- <B>function</B> ">=" (Left, Right : Integer'Base) <B>return</B> Boolean;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>16</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "+" (Right : Integer'Base) <B>return</B> Integer'Base;<BR>
-- <B>function</B> "-" (Right : Integer'Base) <B>return</B> Integer'Base;<BR>
-- <B>function</B> "<B>abs</B>" (Right : Integer'Base) <B>return</B> Integer'Base;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>17</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "+" (Left, Right : Integer'Base) <B>return</B> Integer'Base;<BR>
-- <B>function</B> "-" (Left, Right : Integer'Base) <B>return</B> Integer'Base;<BR>
-- <B>function</B> "*" (Left, Right : Integer'Base) <B>return</B> Integer'Base;<BR>
-- <B>function</B> "/" (Left, Right : Integer'Base) <B>return</B> Integer'Base;<BR>
-- <B>function</B> "<B>rem</B>" (Left, Right : Integer'Base) <B>return</B> Integer'Base;<BR>
-- <B>function</B> "<B>mod</B>" (Left, Right : Integer'Base) <B>return</B> Integer'Base;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>18</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "**" (Left : Integer'Base; Right : Natural)<BR>
-- <B>return</B> Integer'Base;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>19</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The specification of each operator for the type</I><BR>
--<I> root_integer, or for any additional predefined integer</I><BR>
--<I> type, is obtained by replacing Integer by the name of the type</I><BR>
--<I> in the specification of the corresponding operator of the type</I><BR>
--<I> Integer. The right operand of the exponentiation operator</I><BR>
--<I> remains as subtype Natural.</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>20</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The floating point type root_real is predefined.</I><BR>
--<I> The corresponding universal type is universal_real.</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>21</FONT></DIV>
<DIV Class="Examples"><TT> <B>type</B> <A NAME="I4791"></A><A NAME="I4792"></A>Float <B>is</B> <B>digits</B> <I>implementation-defined</I>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>22</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The predefined operators for this type are as follows:</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>23</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "=" (Left, Right : Float) <B>return</B> Boolean;<BR>
-- <B>function</B> "/=" (Left, Right : Float) <B>return</B> Boolean;<BR>
-- <B>function</B> "<" (Left, Right : Float) <B>return</B> Boolean;<BR>
-- <B>function</B> "<=" (Left, Right : Float) <B>return</B> Boolean;<BR>
-- <B>function</B> ">" (Left, Right : Float) <B>return</B> Boolean;<BR>
-- <B>function</B> ">=" (Left, Right : Float) <B>return</B> Boolean;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>24</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "+" (Right : Float) <B>return</B> Float;<BR>
-- <B>function</B> "-" (Right : Float) <B>return</B> Float;<BR>
-- <B>function</B> "<B>abs</B>" (Right : Float) <B>return</B> Float;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>25</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "+" (Left, Right : Float) <B>return</B> Float;<BR>
-- <B>function</B> "-" (Left, Right : Float) <B>return</B> Float;<BR>
-- <B>function</B> "*" (Left, Right : Float) <B>return</B> Float;<BR>
-- <B>function</B> "/" (Left, Right : Float) <B>return</B> Float;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>26</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "**" (Left : Float; Right : Integer'Base) <B>return</B> Float;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>27</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The specification of each operator for the type root_real, or for</I><BR>
--<I> any additional predefined floating point type, is obtained by</I><BR>
--<I> replacing Float by the name of the type in the specification of the</I><BR>
--<I> corresponding operator of the type Float.</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>28</FONT></DIV>
<DIV Class="Examples"><TT> --<I> In addition, the following operators are predefined for the root</I><BR>
--<I> numeric types:</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>29</FONT></DIV>
<DIV Class="Examples"><TT> <B>function</B> "*" (Left : <I>root_integer</I>; Right : <I>root_real</I>)<BR>
<B>return</B> <I>root_real</I>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>30</FONT></DIV>
<DIV Class="Examples"><TT> <B>function</B> "*" (Left : <I>root_real</I>; Right : <I>root_integer</I>)<BR>
<B>return</B> <I>root_real</I>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>31</FONT></DIV>
<DIV Class="Examples"><TT> <B>function</B> "/" (Left : <I>root_real</I>; Right : <I>root_integer</I>)<BR>
<B>return</B> <I>root_real</I>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>32</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The type universal_fixed is predefined.</I><BR>
--<I> The only multiplying operators defined between</I><BR>
--<I> fixed point types are</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>33</FONT></DIV>
<DIV Class="Examples"><TT> <B>function</B> "*" (Left : <I>universal_fixed</I>; Right : <I>universal_fixed</I>)<BR>
<B>return</B> <I>universal_fixed</I>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>34</FONT></DIV>
<DIV Class="Examples"><TT> <B>function</B> "/" (Left : <I>universal_fixed</I>; Right : <I>universal_fixed</I>)<BR>
<B>return</B> <I>universal_fixed</I>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>35</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The declaration of type Character is based on the standard ISO 8859-1 character set.</I><BR>
<BR>
--<I> There are no character literals corresponding to the positions for control characters.</I><BR>
--<I> They are indicated in italics in this definition. See <A HREF="AA-3-5-2.html">3.5.2</A>.</I><BR>
<BR>
<B>type</B> <A NAME="I4793"></A><A NAME="I4794"></A>Character <B>is</B><BR>
(<I>nul</I>, <I>soh</I>, <I>stx</I>, <I>etx</I>, <I>eot</I>, <I>enq</I>, <I>ack</I>, <I>bel</I>, --<I>0 (16#00#) .. 7 (16#07#)</I><BR>
<I>bs</I>, <I>ht</I>, <I>lf</I>, <I>vt</I>, <I>ff</I>, <I>cr</I>, <I>so</I>, <I>si</I>, --<I>8 (16#08#) .. 15 (16#0F#)</I><BR>
<BR>
<I>dle</I>, <I>dc1</I>, <I>dc2</I>, <I>dc3</I>, <I>dc4</I>, <I>nak</I>, <I>syn</I>, <I>etb</I>, --<I>16 (16#10#) .. 23 (16#17#)</I><BR>
<I>can</I>, <I>em</I>, <I>sub</I>, <I>esc</I>, <I>fs</I>, <I>gs</I>, <I>rs</I>, <I>us</I>, --<I>24 (16#18#) .. 31 (16#1F#)</I><BR>
<BR>
' ', '!', '"', '#', '$', '%', '&', ''', --<I>32 (16#20#) .. 39 (16#27#)</I><BR>
'(', ')', '*', '+', ',', '-', '.', '/', --<I>40 (16#28#) .. 47 (16#2F#)</I><BR>
<BR>
'0', '1', '2', '3', '4', '5', '6', '7', --<I>48 (16#30#) .. 55 (16#37#)</I><BR>
'8', '9', ':', ';', '<', '=', '>', '?', --<I>56 (16#38#) .. 63 (16#3F#)</I><BR>
<BR>
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', --<I>64 (16#40#) .. 71 (16#47#)</I><BR>
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', --<I>72 (16#48#) .. 79 (16#4F#)</I><BR>
<BR>
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', --<I>80 (16#50#) .. 87 (16#57#)</I><BR>
'X', 'Y', 'Z', '[', '\', ']', '^', '_', --<I>88 (16#58#) .. 95 (16#5F#)</I><BR>
<BR>
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', --<I>96 (16#60#) .. 103 (16#67#)</I><BR>
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', --<I>104 (16#68#) .. 111 (16#6F#)</I><BR>
<BR>
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', --<I>112 (16#70#) .. 119 (16#77#)</I><BR>
'x', 'y', 'z', '{', '|', '}', '~', <I>del</I>, --<I>120 (16#78#) .. 127 (16#7F#)</I><BR>
<BR>
<I>reserved_128</I>, <I>reserved_129</I>, <I>bph</I>, <I>nbh</I>, --<I>128 (16#80#) .. 131 (16#83#)</I><BR>
<I>reserved_132</I>, <I>nel</I>, <I>ssa</I>, <I>esa</I>, --<I>132 (16#84#) .. 135 (16#87#)</I><BR>
<I>hts</I>, <I>htj</I>, <I>vts</I>, <I>pld</I>, <I>plu</I>, <I>ri</I>, <I>ss2</I>, <I>ss3</I>, --<I>136 (16#88#) .. 143 (16#8F#)</I><BR>
<BR>
<I>dcs</I>, <I>pu1</I>, <I>pu2</I>, <I>sts</I>, <I>cch</I>, <I>mw</I>, <I>spa</I>, <I>epa</I>, --<I>144 (16#90#) .. 151 (16#97#)</I><BR>
<I>sos</I>, <I>reserved_153</I>, <I>sci</I>, <I>csi</I>, --<I>152 (16#98#) .. 155 (16#9B#)</I><BR>
<I>st</I>, <I>osc</I>, <I>pm</I>, <I>apc</I>, --<I>156 (16#9C#) .. 159 (16#9F#)</I><BR>
<BR>
' ', '¡', '¢', '£', '¤', '¥', '¦', '§', --<I>160 (16#A0#) .. 167 (16#A7#)</I><BR>
'¨', '©', 'ª', '«', '¬', '­', '®', '¯', --<I>168 (16#A8#) .. 175 (16#AF#)</I><BR>
<BR>
'°', '±', '²', '³', '´', 'µ', '¶', '·', --<I>176 (16#B0#) .. 183 (16#B7#)</I><BR>
'¸', '¹', 'º', '»', '¼', '½', '¾', '¿', --<I>184 (16#B8#) .. 191 (16#BF#)</I><BR>
<BR>
'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', --<I>192 (16#C0#) .. 199 (16#C7#)</I><BR>
'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', --<I>200 (16#C8#) .. 207 (16#CF#)</I><BR>
<BR>
'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', --<I>208 (16#D0#) .. 215 (16#D7#)</I><BR>
'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', --<I>216 (16#D8#) .. 223 (16#DF#)</I><BR>
<BR>
'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', --<I>224 (16#E0#) .. 231 (16#E7#)</I><BR>
'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', --<I>232 (16#E8#) .. 239 (16#EF#)</I><BR>
<BR>
'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', --<I>240 (16#F0#) .. 247 (16#F7#)</I><BR>
'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ', --<I>248 (16#F8#) .. 255 (16#FF#)</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>36</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The predefined operators for the type Character are the same as for</I><BR>
--<I> any enumeration type.</I><BR>
<BR>
--<I> The declaration of type Wide_Character is based on the standard ISO 10646 BMP character set.</I><BR>
--<I> The first 256 positions have the same contents as type Character. See <A HREF="AA-3-5-2.html">3.5.2</A>.</I><BR>
<BR>
<B>type</B> <A NAME="I4795"></A><A NAME="I4796"></A>Wide_Character <B>is</B> (<I>nul</I>, <I>soh</I> ... <I>FFFE</I>, <I>FFFF</I>);<BR>
<BR>
<B>package</B> ASCII <B>is</B> ... <B>end</B> ASCII; <I>--Obsolescent; see <A HREF="AA-J-5.html">J.5</A></I><BR>
<A NAME="I4797"></A><BR>
</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>37</FONT></DIV>
<DIV Class="Examples"><TT> --<I> Predefined string types:</I><BR>
<BR>
<B>type</B> <A NAME="I4798"></A><A NAME="I4799"></A>String <B>is</B> <B>array</B>(Positive <B>range</B> <>) <B>of</B> Character;<BR>
<B>pragma</B> Pack(String);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>38</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The predefined operators for this type are as follows:</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>39</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "=" (Left, Right: String) <B>return</B> Boolean;<BR>
-- <B>function</B> "/=" (Left, Right: String) <B>return</B> Boolean;<BR>
-- <B>function</B> "<" (Left, Right: String) <B>return</B> Boolean;<BR>
-- <B>function</B> "<=" (Left, Right: String) <B>return</B> Boolean;<BR>
-- <B>function</B> ">" (Left, Right: String) <B>return</B> Boolean;<BR>
-- <B>function</B> ">=" (Left, Right: String) <B>return</B> Boolean;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>40</FONT></DIV>
<DIV Class="Examples"><TT> -- <B>function</B> "&" (Left: String; Right: String) <B>return</B> String;<BR>
-- <B>function</B> "&" (Left: Character; Right: String) <B>return</B> String;<BR>
-- <B>function</B> "&" (Left: String; Right: Character) <B>return</B> String;<BR>
-- <B>function</B> "&" (Left: Character; Right: Character) <B>return</B> String;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>41</FONT></DIV>
<DIV Class="Examples"><TT> <B>type</B> <A NAME="I4800"></A><A NAME="I4801"></A>Wide_String <B>is</B> <B>array</B>(Positive <B>range</B> <>) <B>of</B> Wide_Character;<BR>
<B>pragma</B> Pack(Wide_String);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>42</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The predefined operators for this type correspond to those for String</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>43</FONT></DIV>
<DIV Class="Examples"><TT> <B>type</B> <A NAME="I4802"></A><A NAME="I4803"></A>Duration <B>is</B> <B>delta</B> <I>implementation-defined</I> <B>range</B> <I>implementation-defined</I>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>44</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The predefined operators for the type Duration are the same as for</I><BR>
--<I> any fixed point type.</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>45</FONT></DIV>
<DIV Class="Examples"><TT> --<I> The predefined exceptions:</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>46</FONT></DIV>
<DIV Class="Examples"><TT> <A NAME="I4804"></A>Constraint_Error: <B>exception</B>;<BR>
<A NAME="I4805"></A>Program_Error : <B>exception</B>;<BR>
<A NAME="I4806"></A>Storage_Error : <B>exception</B>;<BR>
<A NAME="I4807"></A>Tasking_Error : <B>exception</B>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>47</FONT></DIV>
<DIV Class="Examples"><TT><B>end</B> Standard;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>48</FONT></DIV>
<DIV Class="Normal"> Standard has no private part. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>48.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Reason: </B>This is important
for portability. All library packages are children of Standard, and if
Standard had a private part then it would be visible to all of them.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>49</FONT></DIV>
<DIV Class="Normal"> In each of the types Character and Wide_Character,
the character literals for the space character (position 32) and the
non-breaking space character (position 160) correspond to different values.
Unless indicated otherwise, each occurrence of the character literal
' ' in this International Standard refers to the space character. Similarly,
the character literals for hyphen (position 45) and soft hyphen (position
173) correspond to different values. Unless indicated otherwise, each
occurrence of the character literal '-' in this International Standard
refers to the hyphen character. </DIV>
<H4 ALIGN=CENTER>Dynamic Semantics</H4>
<DIV Class="Paranum"><FONT SIZE=-2>50</FONT></DIV>
<DIV Class="Normal"> <A NAME="I4808"></A>Elaboration of the body of
Standard has no effect. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>50.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Discussion: </B>Note that the
language does not define where this body appears in the environment <FONT FACE="Arial, Helvetica">declarative_part</FONT>
-- see <A HREF="AA-10.html">10</A>, ``<A HREF="AA-10.html">Program Structure
and Compilation Issues</A>''. </FONT></DIV>
<H4 ALIGN=CENTER>Implementation Permissions</H4>
<DIV Class="Paranum"><FONT SIZE=-2>51</FONT></DIV>
<DIV Class="Normal"> An implementation may provide additional predefined
integer types and additional predefined floating point types. Not all
of these types need have names. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>51.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>To be honest: </B>An implementation
may add representation items to package Standard, for example to specify
the internal codes of type Boolean, or the Small of type Duration.</FONT></DIV>
<H4 ALIGN=CENTER>Implementation Advice</H4>
<DIV Class="Paranum"><FONT SIZE=-2>52</FONT></DIV>
<DIV Class="Normal"> If an implementation provides additional named
predefined integer types, then the names should end with ``Integer''
as in ``Long_Integer''. If an implementation provides additional named
predefined floating point types, then the names should end with ``Float''
as in ``Long_Float''. </DIV>
<DIV Class="NotesHeader"><FONT SIZE=-1>NOTES</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>53</FONT></DIV>
<DIV Class="Notes"><FONT SIZE=-1>1 Certain aspects of the
predefined entities cannot be completely described in the language itself.
For example, although the enumeration type Boolean can be written showing
the two enumeration literals False and True, the short-circuit control
forms cannot be expressed in the language.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>54</FONT></DIV>
<DIV Class="Notes"><FONT SIZE=-1>2 As explained in <A HREF="AA-8-1.html">8.1</A>,
``<A HREF="AA-8-1.html">Declarative Region</A>'' and <A HREF="AA-10-1-4.html">10.1.4</A>,
``<A HREF="AA-10-1-4.html">The Compilation Process</A>'', the declarative
region of the package Standard encloses every library unit and consequently
the main subprogram; the declaration of every library unit is assumed
to occur within this declarative region. <FONT FACE="Arial, Helvetica">Library_item</FONT>s
are assumed to be ordered in such a way that there are no forward semantic
dependences. However, as explained in <A HREF="AA-8-3.html">8.3</A>,
``<A HREF="AA-8-3.html">Visibility</A>'', the only library units that
are visible within a given compilation unit are the library units named
by all <FONT FACE="Arial, Helvetica">with_clauses</FONT> that apply to
the given unit, and moreover, within the declarative region of a given
library unit, that library unit itself.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>55</FONT></DIV>
<DIV Class="Notes"><FONT SIZE=-1>3 If all <FONT FACE="Arial, Helvetica">block_statement</FONT>s
of a program are named, then the name of each program unit can always
be written as an expanded name starting with Standard (unless Standard
is itself hidden). The name of a library unit cannot be a homograph of
a name (such as Integer) that is already declared in Standard.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>56</FONT></DIV>
<DIV Class="Notes"><FONT SIZE=-1>4 The exception Standard.Numeric_Error
is defined in <A HREF="AA-J-6.html">J.6</A>. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>56.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Discussion: </B>The declaration
of Natural needs to appear between the declaration of Integer and the
(implicit) declaration of the "**" operator for Integer, because
a formal parameter of "**" is of subtype Natural. This would
be impossible in normal code, because the implicit declarations for a
type occur immediately after the type declaration, with no possibility
of intervening explicit declarations. But we're in Standard, and Standard
is somewhat magic anyway.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>56.b</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1>Using Natural as the subtype of
the formal of "**" seems natural; it would be silly to have
a textual rule about Constraint_Error being raised when there is a perfectly
good subtype that means just that. Furthermore, by not using Integer
for that formal, it helps remind the reader that the exponent remains
Natural even when the left operand is replaced with the derivative of
Integer. It doesn't logically imply that, but it's still useful as a
reminder.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>56.c</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1>In any case, declaring these general-purpose
subtypes of Integer close to Integer seems more readable than declaring
them much later. </FONT></DIV>
<H4 ALIGN=CENTER>Extensions to Ada 83</H4>
<DIV Class="Paranum"><FONT SIZE=-2>56.d</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><A NAME="I4809"></A>Package Standard
is declared to be pure. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>56.e</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Discussion: </B>The introduction
of the types Wide_Character and Wide_String is not an Ada 95 extension
to Ada 83, since ISO WG9 has approved these as an authorized extension
of the original Ada 83 standard that is part of that standard. </FONT></DIV>
<H4 ALIGN=CENTER>Wording Changes from Ada 83</H4>
<DIV Class="Paranum"><FONT SIZE=-2>56.f</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1>Numeric_Error is made obsolescent.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>56.g</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1>The declarations of Natural and
Positive are moved to just after the declaration of Integer, so that
"**" can refer to Natural without a forward reference. There's
no real need to move Positive, too -- it just came along for the ride.
</FONT></DIV>
<HR>
<P><A HREF="AA-TOC.html">Contents</A> <A HREF="AA-0-29.html">Index</A> <A HREF="AA-A.html">Previous</A> <A HREF="AA-A-2.html">Next</A> <A HREF="AA-TTL.html">Legal</A></P>
</BODY>
</HTML>
|