Debian Codegraph @

source_2020/pre_standard.mss

raw
1 @comment{ $Source: e:\\cvsroot/ARM/Source/pre_standard.mss,v $ }
2 @comment{ $Revision: 1.43 $ $Date: 2018/04/07 06:16:42 $ $Author: randy $ }
3 @Part(predefstandard, Root="ada.mss")
4
5 @Comment{$Date: 2018/04/07 06:16:42 $}
6
7 @RMNewPageVer{Version=[2]}@Comment{For printed version of Ada 2005 RM}
8 @RMNewPageVer{Version=[3]}@Comment{For printed version of Ada 2012 RM}
9 @LabeledClause{The Package Standard}
10
11 @begin{Intro}
12 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0299-1]}
13 This @Chg{Version=[3],New=[subclause],Old=[clause]} outlines
14 the specification of the package Standard
15 containing all predefined identifiers in the language.
16 @PDefn{unspecified}
17 The corresponding package body is not specified by the language.
18
19 The operators that are predefined for the types declared in the
20 package Standard are given in comments since they are implicitly
21 declared.
22 @Defn2{Term=[italics],Sec=(pseudo-names of anonymous types)}
23 Italics are used for pseudo-names of anonymous types (such
24 as @i{root_real}) and for undefined information (such as
25 @i{implementation-defined}).
26 @begin{Ramification}
27 All of the predefined operators are of convention Intrinsic.
28 @end{Ramification}
29
30 @end{Intro}
31
32 @begin{StaticSem}
33 @Leading@;The library package Standard has the following declaration:
34 @ImplDef{The names and characteristics of the numeric subtypes declared in
35 the visible part of package Standard.}
36 @begin{Example}
37 @RootLibUnit{Standard}@key[package] Standard @key[is]
38 @key[pragma] Pure(Standard);
39
40 @key[type] @AdaTypeDefn{Boolean} @key[is] (False, True);
41
42
43 @Keepnext --@RI{ The predefined relational operators for this type are as follows:}
44
45 @ChgRef{Version=[1],Kind=[Revised],Ref=[8652/0028],ARef=[AI95-00145-01]}
46 -- @key[function] "=" (Left, Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean;
47 -- @key[function] "/=" (Left, Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean;
48 -- @key[function] "<" (Left, Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean;
49 -- @key[function] "<=" (Left, Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean;
50 -- @key[function] ">" (Left, Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean;
51 -- @key[function] ">=" (Left, Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean;
52
53
54 @Keepnext --@RI{ The predefined logical operators and the predefined logical}
55 --@RI{ negation operator are as follows:}
56
57 @ChgRef{Version=[1],Kind=[Revised],Ref=[8652/0028],ARef=[AI95-00145-01]}
58 -- @key[function] "@key[and]" (Left, Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean@Chg{New=['Base],Old=[]};
59 -- @key[function] "@key[or]" (Left, Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean@Chg{New=['Base],Old=[]};
60 -- @key[function] "@key[xor]" (Left, Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean@Chg{New=['Base],Old=[]};
61
62
63 @ChgRef{Version=[1],Kind=[Revised],Ref=[8652/0028],ARef=[AI95-00145-01]}
64 -- @key[function] "@key[not]" (Right : Boolean@Chg{New=['Base],Old=[]}) @key[return] Boolean@Chg{New=['Base],Old=[]};
65
66
67 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00434-01]}
68 --@RI{ The integer type root_integer @Chg{Version=[2],New=[and the],Old=[is predefined.]}}
69 --@RI{ @Chg{Version=[2],New=[],Old=[The ]}corresponding universal type @Chg{Version=[2],New=[],Old=[is ]}universal_integer@Chg{Version=[2],New=[ are predefined],Old=[]}.}
70
71
72 @key[type] @AdaTypeDefn{Integer} @key[is] @key{range} @RI{implementation-defined};
73
74
75 @key[subtype] @AdaSubtypeDefn{Name=[Natural],Of=[Integer]} @key[is] Integer @key[range] 0 .. Integer'Last;
76 @key[subtype] @AdaSubtypeDefn{Name=[Positive],Of=[Integer]} @key[is] Integer @key[range] 1 .. Integer'Last;
77
78
79 @Keepnext --@RI{ The predefined operators for type Integer are as follows:}
80
81 -- @key[function] "=" (Left, Right : Integer'Base) @key[return] Boolean;
82 -- @key[function] "/=" (Left, Right : Integer'Base) @key[return] Boolean;
83 -- @key[function] "<" (Left, Right : Integer'Base) @key[return] Boolean;
84 -- @key[function] "<=" (Left, Right : Integer'Base) @key[return] Boolean;
85 -- @key[function] ">" (Left, Right : Integer'Base) @key[return] Boolean;
86 -- @key[function] ">=" (Left, Right : Integer'Base) @key[return] Boolean;
87
88
89 -- @key[function] "+" (Right : Integer'Base) @key[return] Integer'Base;
90 -- @key[function] "-" (Right : Integer'Base) @key[return] Integer'Base;
91 -- @key[function] "@key[abs]" (Right : Integer'Base) @key[return] Integer'Base;
92
93
94 -- @key[function] "+" (Left, Right : Integer'Base) @key[return] Integer'Base;
95 -- @key[function] "-" (Left, Right : Integer'Base) @key[return] Integer'Base;
96 -- @key[function] "*" (Left, Right : Integer'Base) @key[return] Integer'Base;
97 -- @key[function] "/" (Left, Right : Integer'Base) @key[return] Integer'Base;
98 -- @key[function] "@key[rem]" (Left, Right : Integer'Base) @key[return] Integer'Base;
99 -- @key[function] "@key[mod]" (Left, Right : Integer'Base) @key[return] Integer'Base;
100
101
102 -- @key[function] "**" (Left : Integer'Base; Right : Natural)
103 -- @key[return] Integer'Base;
104
105
106 --@RI{ The specification of each operator for the type}
107 --@RI{ root_integer, or for any additional predefined integer}
108 --@RI{ type, is obtained by replacing Integer by the name of the type}
109 --@RI{ in the specification of the corresponding operator of the type}
110 --@RI{ Integer. The right operand of the exponentiation operator}
111 --@RI{ remains as subtype Natural.}
112
113
114 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00434-01]}
115 --@RI{ The floating point type root_real @Chg{Version=[2],New=[and the],Old=[is predefined.]}}
116 --@RI{ @Chg{Version=[2],New=[],Old=[The ]}corresponding universal type @Chg{Version=[2],New=[],Old=[is ]}universal_real@Chg{Version=[2],New=[ are predefined],Old=[]}.}
117
118
119 @key[type] @AdaTypeDefn{Float} @key[is] @key{digits} @RI{implementation-defined};
120
121
122 @Keepnext --@RI{ The predefined operators for this type are as follows:}
123
124 -- @key[function] "=" (Left, Right : Float) @key[return] Boolean;
125 -- @key[function] "/=" (Left, Right : Float) @key[return] Boolean;
126 -- @key[function] "<" (Left, Right : Float) @key[return] Boolean;
127 -- @key[function] "<=" (Left, Right : Float) @key[return] Boolean;
128 -- @key[function] ">" (Left, Right : Float) @key[return] Boolean;
129 -- @key[function] ">=" (Left, Right : Float) @key[return] Boolean;
130
131
132 -- @key[function] "+" (Right : Float) @key[return] Float;
133 -- @key[function] "-" (Right : Float) @key[return] Float;
134 -- @key[function] "@key[abs]" (Right : Float) @key[return] Float;
135
136
137 -- @key[function] "+" (Left, Right : Float) @key[return] Float;
138 -- @key[function] "-" (Left, Right : Float) @key[return] Float;
139 -- @key[function] "*" (Left, Right : Float) @key[return] Float;
140 -- @key[function] "/" (Left, Right : Float) @key[return] Float;
141
142
143 -- @key[function] "**" (Left : Float; Right : Integer'Base) @key[return] Float;
144
145
146 --@RI{ The specification of each operator for the type root_real, or for}
147 --@RI{ any additional predefined floating point type, is obtained by}
148 --@RI{ replacing Float by the name of the type in the specification of the}
149 --@RI{ corresponding operator of the type Float.}
150
151
152 @Keepnext --@RI{ In addition, the following operators are predefined for the root}
153 --@RI{ numeric types:}
154
155 @key[function] "*" (Left : @RI{root_integer}; Right : @RI{root_real})
156 @key[return] @RI{root_real};
157
158
159 @key[function] "*" (Left : @RI{root_real}; Right : @RI{root_integer})
160 @key[return] @RI{root_real};
161
162
163 @key[function] "/" (Left : @RI{root_real}; Right : @RI{root_integer})
164 @key[return] @RI{root_real};
165
166
167 --@RI{ The type universal_fixed is predefined.}
168 --@RI{ The only multiplying operators defined between}
169 --@RI{ fixed point types are}
170
171 @key[function] "*" (Left : @RI[universal_fixed]; Right : @RI[universal_fixed])
172 @key[return] @RI[universal_fixed];
173
174 @key[function] "/" (Left : @RI[universal_fixed]; Right : @RI[universal_fixed])
175 @key[return] @RI[universal_fixed];
176
177 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00230-01]}
178 @ChgAdded{Version=[2],Text=[ --@RI{ The type universal_access is predefined.}
179 --@RI{ The following equality operators are predefined:}]}
180
181 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00230-01]}
182 @ChgAdded{Version=[2],Text=[ @key[function] "=" (Left, Right: @RI[universal_access]) @key[return] Boolean;
183 @key[function] "/=" (Left, Right: @RI[universal_access]) @key[return] Boolean;]}
184
185 @ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00415-01]}
186 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0181-1],ARef=[AI05-0248-1]}
187 @tabclear()@tabset(P7, P14, P21, P28, P37, P44, P51, P58, P64)
188 @comment{blank line}
189 --@RI{ The declaration of type Character is based on the standard ISO 8859-1 character set.}
190 @comment{blank line}
191 --@RI{ There are no character literals corresponding to the positions for control characters.}
192 --@RI{ They are indicated in italics in this definition. See @refsecnum[Character Types].}
193 @comment[blank line]
194 @key[type] @AdaTypeDefn{Character} @key[is]
195 (@RI[nul],@\@RI[soh],@\@RI[stx],@\@RI[etx],@\@RI[eot],@\@RI[enq],@\@RI[ack],@\@RI[bel],@\--@RI{0 (16#00#) .. 7 (16#07#)}
196 @RI[bs],@\@RI[ht],@\@RI[lf],@\@RI[vt],@\@RI[ff],@\@RI[cr],@\@RI[so],@\@RI[si],@\--@RI{8 (16#08#) .. 15 (16#0F#)}
197 @comment{blank line}
198 @RI[dle],@\@RI[dc1],@\@RI[dc2],@\@RI[dc3],@\@RI[dc4],@\@RI[nak],@\@RI[syn],@\@RI[etb],@\--@RI{16 (16#10#) .. 23 (16#17#)}
199 @RI[can],@\@RI[em],@\@RI[sub],@\@RI[esc],@\@RI[fs],@\@RI[gs],@\@RI[rs],@\@RI[us],@\--@RI{24 (16#18#) .. 31 (16#1F#)}
200 @comment{blank line}
201 ' ',@\'!',@\'"',@\'#',@\'$',@\'%',@\'&',@\''',@\--@RI{32 (16#20#) .. 39 (16#27#)}
202 '(',@\')',@\'*',@\'+',@\',',@\'-',@\'.',@\'/',@\--@RI{40 (16#28#) .. 47 (16#2F#)}
203 @comment{blank line}
204 '0',@\'1',@\'2',@\'3',@\'4',@\'5',@\'6',@\'7',@\--@RI{48 (16#30#) .. 55 (16#37#)}
205 '8',@\'9',@\':',@\';',@\'<',@\'=',@\'>',@\'?',@\--@RI{56 (16#38#) .. 63 (16#3F#)}
206 @comment{blank line}
207 '@@',@\'A',@\'B',@\'C',@\'D',@\'E',@\'F',@\'G',@\--@RI{64 (16#40#) .. 71 (16#47#)}
208 'H',@\'I',@\'J',@\'K',@\'L',@\'M',@\'N',@\'O',@\--@RI{72 (16#48#) .. 79 (16#4F#)}
209 @comment{blank line}
210 'P',@\'Q',@\'R',@\'S',@\'T',@\'U',@\'V',@\'W',@\--@RI{80 (16#50#) .. 87 (16#57#)}
211 'X',@\'Y',@\'Z',@\'[',@\'\',@\']',@\'^',@\'_',@\--@RI{88 (16#58#) .. 95 (16#5F#)}
212 @comment{blank line}
213 '`',@\'a',@\'b',@\'c',@\'d',@\'e',@\'f',@\'g',@\--@RI{96 (16#60#) .. 103 (16#67#)}
214 'h',@\'i',@\'j',@\'k',@\'l',@\'m',@\'n',@\'o',@\--@RI{104 (16#68#) .. 111 (16#6F#)}
215 @comment{blank line}
216 'p',@\'q',@\'r',@\'s',@\'t',@\'u',@\'v',@\'w',@\--@RI{112 (16#70#) .. 119 (16#77#)}
217 'x',@\'y',@\'z',@\'{',@\'|',@\'}',@\'~',@\@RI[del],@\--@RI{120 (16#78#) .. 127 (16#7F#)}
218 @Comment{Blank line}
219 @RI[reserved_128],@\@RI[reserved_129],@\@RI[bph],@\@RI[nbh],@\@\@\--@RI{128 (16#80#) .. 131 (16#83#)}
220 @RI[reserved_132],@\@RI[nel],@\@RI[ssa],@\@RI[esa],@\@\@\@\--@RI{132 (16#84#) .. 135 (16#87#)}
221 @RI[hts],@\@RI[htj],@\@RI[vts],@\@RI[pld],@\@RI[plu],@\@RI[ri],@\@RI[ss2],@\@RI[ss3],@\--@RI{136 (16#88#) .. 143 (16#8F#)}
222 @comment{blank line}
223 @RI[dcs],@\@RI[pu1],@\@RI[pu2],@\@RI[sts],@\@RI[cch],@\@RI[mw],@\@RI[spa],@\@RI[epa],@\--@RI{144 (16#90#) .. 151 (16#97#)}
224 @RI[sos],@\@RI[reserved_153],@\@RI[sci],@\@RI[csi],@\@\@\@\--@RI{152 (16#98#) .. 155 (16#9B#)}
225 @RI[st],@\@RI[osc],@\@RI[pm],@\@RI[apc],@\@\@\@\@\--@RI{156 (16#9C#) .. 159 (16#9F#)}
226 @comment{blank line}
227 ' ',@\'@latin1(161)',@\'@latin1(162)',@\'@latin1(163)',@\'@latin1(164)',@\'@latin1(165)',@\'@latin1(166)',@\'@latin1(167)',@\--@RI{160 (16#A0#) .. 167 (16#A7#)}
228 '@latin1(168)',@\'@latin1(169)',@\'@latin1(170)',@\'@latin1(171)',@Chg{Version=[3],New=[@\@\@\@\@\--@RI{168 (16#A8#) .. 171 (16#AB#)}
229 @latin1(172)',@\@RI[soft_hyphen],@\'@latin1(174)',@\'@latin1(175)',@\@\@\@\--@RI{172 (16#AC#) .. 175 (16#AF#)}],Old=[@\'@latin1(172)',@\'@latin1(173)',@\'@latin1(174)',@\'@latin1(175)',@\--@RI{168 (16#A8#) .. 175 (16#AF#)}]}
230 @comment{blank line}
231 '@latin1(176)',@\'@latin1(177)',@\'@latin1(178)',@\'@latin1(179)',@\'@latin1(180)',@\'@latin1(181)',@\'@latin1(182)',@\'@latin1(183)',@\--@RI{176 (16#B0#) .. 183 (16#B7#)}
232 '@latin1(184)',@\'@latin1(185)',@\'@latin1(186)',@\'@latin1(187)',@\'@latin1(188)',@\'@latin1(189)',@\'@latin1(190)',@\'@latin1(191)',@\--@RI{184 (16#B8#) .. 191 (16#BF#)}
233 @comment{blank line}
234 '@latin1(192)',@\'@latin1(193)',@\'@latin1(194)',@\'@latin1(195)',@\'@latin1(196)',@\'@latin1(197)',@\'@latin1(198)',@\'@latin1(199)',@\--@RI{192 (16#C0#) .. 199 (16#C7#)}
235 '@latin1(200)',@\'@latin1(201)',@\'@latin1(202)',@\'@latin1(203)',@\'@latin1(204)',@\'@latin1(205)',@\'@latin1(206)',@\'@latin1(207)',@\--@RI{200 (16#C8#) .. 207 (16#CF#)}
236 @comment{blank line}
237 '@latin1(208)',@\'@latin1(209)',@\'@latin1(210)',@\'@latin1(211)',@\'@latin1(212)',@\'@latin1(213)',@\'@latin1(214)',@\'@latin1(215)',@\--@RI{208 (16#D0#) .. 215 (16#D7#)}
238 '@latin1(216)',@\'@latin1(217)',@\'@latin1(218)',@\'@latin1(219)',@\'@latin1(220)',@\'@latin1(221)',@\'@latin1(222)',@\'@latin1(223)',@\--@RI{216 (16#D8#) .. 223 (16#DF#)}
239 @comment{blank line}
240 '@latin1(224)',@\'@latin1(225)',@\'@latin1(226)',@\'@latin1(227)',@\'@latin1(228)',@\'@latin1(229)',@\'@latin1(230)',@\'@latin1(231)',@\--@RI{224 (16#E0#) .. 231 (16#E7#)}
241 '@latin1(232)',@\'@latin1(233)',@\'@latin1(234)',@\'@latin1(235)',@\'@latin1(236)',@\'@latin1(237)',@\'@latin1(238)',@\'@latin1(239)',@\--@RI{232 (16#E8#) .. 239 (16#EF#)}
242 @comment{blank line}
243 '@latin1(240)',@\'@latin1(241)',@\'@latin1(242)',@\'@latin1(243)',@\'@latin1(244)',@\'@latin1(245)',@\'@latin1(246)',@\'@latin1(247)',@\--@RI{240 (16#F0#) .. 247 (16#F7#)}
244 '@latin1(248)',@\'@latin1(249)',@\'@latin1(250)',@\'@latin1(251)',@\'@latin1(252)',@\'@latin1(253)',@\'@latin1(254)',@\'@latin1(255)'@Chg{Version=[2],New=[);],Old=[,@\]}--@RI{248 (16#F8#) .. 255 (16#FF#)}
245
246
247 --@RI{ The predefined operators for the type Character are the same as for}
248 --@RI{ any enumeration type.}
249 @Softpage@;
250
251 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00395-01]}@Comment{Odd missing paragraph number here}
252 @ChgRef{Version=[3],Kind=[RevisedAdded],ARef=[AI05-0266-1]}
253 @ChgRef{Version=[3],Kind=[RevisedAdded],ARef=[AI12-0263-1]}
254 @Chg{Version=[2],New=[],Old=[@noparanum@;]} --@RI{ The declaration of type Wide_Character is based on the standard @Chg{Version=[2],New=[ISO/IEC],Old=[ISO]} 10646@Chg{Version=[2],New=[:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]}],Old=[]} BMP character@Chg{Version=[2],New=[],Old=[ set.]}}
255 --@RI{ @Chg{Version=[2],New=[set. ],Old=[]}The first 256 positions have the same contents as type Character. See @refsecnum[Character types].}
256 @comment[blank line]
257 @key[type] @AdaTypeDefn{Wide_Character} @key[is] (@RI[nul], @RI[soh] ... @RI[@Chg{Version=[2],New=[Hex_0000FFFE],Old=[FFFE]}], @RI[@Chg{Version=[2],New=[Hex_0000FFFF],Old=[FFFF]}]);
258
259 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01],ARef=[AI95-00395-01]}
260 @ChgRef{Version=[3],Kind=[RevisedAdded],ARef=[AI05-0266-1]}
261 @ChgRef{Version=[3],Kind=[RevisedAdded],ARef=[AI12-0263-1]}
262 @ChgAdded{Version=[2],Text=[ --@RI[ The declaration of type Wide_Wide_Character is based on the full]
263 --@RI[ ISO/IEC 10646:@Chg{Version=[3],New=[@Chg{Version=[5],New=[2017],Old=[2011]}],Old=[2003]} character set. The first 65536 positions have the]
264 --@RI[ same contents as type Wide_Character. See @refsecnum[Character types].]
265 @comment[blank line]
266 @key[type] @AdaTypeDefn{Wide_Wide_Character} @key[is] (@RI[nul], @RI[soh] ... @RI[Hex_7FFFFFFE], @RI[Hex_7FFFFFFF]);
267 @key[for] Wide_Wide_Character'Size @key[use] 32;]}
268
269 @ChgRef{Version=[2],Kind=[Added]}@Comment{Odd missing paragraph number here}
270 @Chg{Version=[2],New=[],Old=[@noparanum@;]} @key[package] @AdaPackDefn{ASCII} @key[is] ... @key[end] ASCII; --@RI{Obsolescent; see @RefSecNum[ASCII]}
271 @Defn2{Term=[ASCII], Sec=(package physically nested within the declaration of Standard)}
272 @comment[blank line]
273
274 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0229-1]}
275 --@RI{ Predefined string types:}
276 @comment[blank line]
277 @key[type] @AdaTypeDefn{String} @key[is] @key[array](Positive @key[range] <>) @key[of] Character@Chg{Version=[3],New=[
278 @key[with] Pack],Old=[;
279 @key[pragma] Pack(String)]};
280
281 @Keepnext --@RI{ The predefined operators for this type are as follows:}
282
283 -- @key[function] "=" (Left, Right: String) @key[return] Boolean;
284 -- @key[function] "/=" (Left, Right: String) @key[return] Boolean;@Softpage
285 -- @key[function] "<" (Left, Right: String) @key[return] Boolean;
286 -- @key[function] "<=" (Left, Right: String) @key[return] Boolean;
287 -- @key[function] ">" (Left, Right: String) @key[return] Boolean;
288 -- @key[function] ">=" (Left, Right: String) @key[return] Boolean;
289
290
291 -- @key[function] "&" (Left: String; Right: String) @key[return] String;
292 -- @key[function] "&" (Left: Character; Right: String) @key[return] String;
293 -- @key[function] "&" (Left: String; Right: Character) @key[return] String;
294 -- @key[function] "&" (Left: Character; Right: Character) @key[return] String;
295
296
297 @ChgRef{Version=[3],Kind=[Revised],ARef=[AI05-0229-1]}
298 @key[type] @AdaTypeDefn{Wide_String} @key[is] @key[array](Positive @key[range] <>) @key[of] Wide_Character@Chg{Version=[3],New=[
299 @key[with] Pack],Old=[;
300 @key[pragma] Pack(Wide_String)]};
301
302 --@RI{ The predefined operators for this type correspond to those for String.}
303
304 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
305 @ChgRef{Version=[3],Kind=[RevisedAdded],ARef=[AI05-0229-1]}
306 @ChgAdded{Version=[2],Text=[ @key[type] @AdaTypeDefn{Wide_Wide_String} @key[is array] (Positive @key[range] <>)
307 @key[of] Wide_Wide_Character@Chg{Version=[3],New=[
308 @key[with] Pack],Old=[;
309 @key[pragma] Pack (Wide_Wide_String)]};]}
310
311 @ChgRef{Version=[2],Kind=[Added],ARef=[AI95-00285-01]}
312 @ChgAdded{Version=[2],Text=[ --@RI[ The predefined operators for this type correspond to those for String.]]}
313
314
315 @key[type] @AdaTypeDefn{Duration} @key[is] @key[delta] @RI{implementation-defined} @key[range] @RI{implementation-defined};
316
317 --@RI{ The predefined operators for the type Duration are the same as for}
318 --@RI{ any fixed point type.}
319
320
321 @Keepnext --@RI{ The predefined exceptions:}
322
323 @AdaExcDefn{Constraint_Error}: @key[exception];
324 @AdaExcDefn{Program_Error} : @key[exception];
325 @AdaExcDefn{Storage_Error} : @key[exception];
326 @AdaExcDefn{Tasking_Error} : @key[exception];
327
328 @key[end] Standard;
329 @end{Example}
330
331 Standard has no private part.
332 @begin{Reason}
333 This is important for portability. All library packages
334 are children of Standard, and if Standard had a private part then
335 it would be visible to all of them.
336 @end{reason}
337
338 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00285-01]}
339 In each of the types Character@Chg{Version=[2],New=[,],Old=[ and]}
340 Wide_Character@Chg{Version=[2],New=[, and Wide_Wide_Character],Old=[]},
341 the character literals for the space character (position 32)
342 and the non-breaking
343 space character (position 160)
344 correspond to different values. Unless
345 indicated otherwise, each occurrence of
346 the character literal
347 ' ' in this International Standard
348 refers to the space character.
349 Similarly, the character literals
350 for hyphen (position 45)
351 and soft hyphen (position 173) correspond to different values.
352 Unless indicated otherwise, each occurrence of
353 the character literal
354 '@en@;' in this International Standard
355 refers to the hyphen character.
356 @end{StaticSem}
357
358 @begin{RunTime}
359 @PDefn2{Term=[elaboration], Sec=(package_body of Standard)}
360 Elaboration of the body of Standard has no effect.
361 @begin{Discussion}
362 Note that the language does not define where
363 this body appears in the environment @nt{declarative_part}
364 @em see @RefSec{Program Structure and Compilation Issues}.
365 @end{Discussion}
366 @end{RunTime}
367
368 @begin{ImplPerm}
369 An implementation may provide additional predefined integer
370 types and additional predefined floating point types.
371 Not all of these types need have names.
372 @begin{Honest}
373
374 An implementation may add representation items to package Standard, for
375 example to specify the internal codes of type Boolean,
376 or the Small of type Duration.
377
378 @end{Honest}
379 @end{ImplPerm}
380
381 @begin{ImplAdvice}
382 If an implementation provides additional named predefined integer types,
383 then the names should end with @lquotes@;Integer@rquotes@; as in @lquotes@;Long_Integer@rquotes@;.
384 If an implementation provides additional named predefined
385 floating point types,
386 then the names should end with @lquotes@;Float@rquotes@; as in @lquotes@;Long_Float@rquotes@;.
387 @ChgImplAdvice{Version=[2],Kind=[AddedNormal],Text=[@ChgAdded{Version=[2],
388 Text=[If an implementation provides additional named predefined integer types,
389 then the names should end with @lquotes@;Integer@rquotes@;.
390 If an implementation provides additional named predefined
391 floating point types,
392 then the names should end with @lquotes@;Float@rquotes@;.]}]}
393 @end{ImplAdvice}
394
395 @begin{Notes}
396 Certain aspects of the predefined entities cannot be completely
397 described in the language itself. For example, although the
398 enumeration type Boolean can be written showing the two enumeration
399 literals False and True, the short-circuit control forms cannot be
400 expressed in the language.
401
402 As explained in @RefSec{Declarative Region}
403 and @RefSec{The Compilation Process},
404 the declarative region of the package Standard encloses every
405 library unit and consequently the main subprogram;
406 the declaration of every library unit is assumed to occur
407 within this declarative region.
408 @nt{Library_item}s
409 are assumed to be ordered in such a way that there are no forward
410 semantic dependences.
411 However, as explained in @RefSec{Visibility}, the only library units that are
412 visible within a given compilation unit are
413 the library units named by all @nt{with_clause}s that
414 apply to the given unit,
415 and moreover, within the declarative region of a given library unit,
416 that library unit itself.
417
418 If all @nt{block_statement}s of a program are named, then the name
419 of each program unit can always be written as an expanded name
420 starting with Standard (unless Standard is itself hidden).
421 The name of a library unit cannot be a homograph of a name (such as
422 Integer) that is already declared in Standard.
423
424 The exception Standard.Numeric_Error is defined in @RefSecNum{Numeric_Error}.
425 @begin{Discussion}
426 The declaration of Natural needs to appear between the declaration of
427 Integer and the (implicit) declaration of the "**" operator for Integer,
428 because a formal parameter of "**" is of subtype Natural.
429 This would be impossible in normal code, because the implicit
430 declarations for a type occur immediately after the type declaration,
431 with no possibility of intervening explicit declarations.
432 But we're in Standard, and Standard is somewhat magic anyway.
433
434 Using Natural as the subtype of the formal of "**" seems natural;
435 it would be silly to have a textual rule about Constraint_Error being
436 raised when there is a perfectly good subtype that means just that.
437 Furthermore, by not using Integer for that formal, it helps remind the
438 reader that the exponent remains Natural even when the left operand is
439 replaced with the derivative of Integer.
440 It doesn't logically imply that, but it's still useful as a reminder.
441
442 In any case, declaring these general-purpose subtypes of Integer close
443 to Integer seems more readable than declaring them much later.
444 @end{Discussion}
445 @end{Notes}
446
447 @begin{Extend83}
448 @Defn{extensions to Ada 83}
449 Package Standard is declared to be pure.
450 @begin{discussion}
451 The introduction of the types Wide_Character and Wide_String is not
452 an Ada 95 extension to Ada 83, since ISO WG9 has approved these as an
453 authorized extension of the original Ada 83 standard that is part
454 of that standard.
455 @end{discussion}
456 @end{Extend83}
457
458 @begin{DiffWord83}
459 Numeric_Error is made obsolescent.
460
461 The declarations of Natural and Positive are moved to just after the
462 declaration of Integer, so that "**" can refer to Natural without a
463 forward reference.
464 There's no real need to move Positive, too @em it just came along for
465 the ride.
466 @end{DiffWord83}
467
468 @begin{Extend95}
469 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00285-01]}
470 @ChgAdded{Version=[2],Text=[@Defn{extensions to Ada 95}
471 Types Wide_Wide_Character and Wide_Wide_String are new.]}
472 @begin{Discussion}
473 @ChgRef{Version=[2],Kind=[AddedNormal]}
474 @ChgAdded{Version=[2],Text=[The inconsistencies associated with these
475 types are documented in @RefSecNum{Character Types} and
476 @RefSecNum{String Types}.]}
477 @end{Discussion}
478
479 @ChgRef{Version=[2],Kind=[AddedNormal],ARef=[AI95-00230-01]}
480 @ChgAdded{Version=[2],Text=[Type @i<universal_access> and the equality
481 operations for it are new.]}
482 @end{Extend95}
483
484 @begin{DiffWord95}
485 @ChgRef{Version=[2],Kind=[AddedNormal],Ref=[8652/0028],ARef=[AI95-00145-01]}
486 @ChgAdded{Version=[2],Text=[@b<Corrigendum:> Corrected the parameter
487 type for the Boolean operators declared in Standard..]}
488 @end{DiffWord95}
489
490 @begin{DiffWord2005}
491 @ChgRef{Version=[3],Kind=[AddedNormal],ARef=[AI05-0181-1]}
492 @ChgAdded{Version=[3],Text=[@b<Correction:> Since soft_hyphen (position
493 173) is defined to be nongraphic, gave it a name.]}
494 @begin{Discussion}
495 @ChgRef{Version=[3],Kind=[AddedNormal]}
496 @ChgAdded{Version=[3],Text=[The inconsistencies associated with this
497 change are documented in @RefSecNum{Scalar Types}.]}
498 @end{Discussion}
499 @end{DiffWord2005}