Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

198 rindas
8.4KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Free Software" and "Free Software Needs
  8. Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
  9. and with the Back-Cover Texts as in (a) below.
  10. (a) The FSF's Back-Cover Text is: "You are free to copy and modify
  11. this GNU Manual. Buying copies from GNU Press supports the FSF in
  12. developing GNU and promoting software freedom." -->
  13. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  16. <title>Omissions from Ada (Debugging with GDB)</title>
  17. <meta name="description" content="Omissions from Ada (Debugging with GDB)">
  18. <meta name="keywords" content="Omissions from Ada (Debugging with GDB)">
  19. <meta name="resource-type" content="document">
  20. <meta name="distribution" content="global">
  21. <meta name="Generator" content="makeinfo">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
  24. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="Ada.html#Ada" rel="up" title="Ada">
  26. <link href="Additions-to-Ada.html#Additions-to-Ada" rel="next" title="Additions to Ada">
  27. <link href="Ada-Mode-Intro.html#Ada-Mode-Intro" rel="prev" title="Ada Mode Intro">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.indentedblock {margin-right: 0em}
  32. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  33. blockquote.smallquotation {font-size: smaller}
  34. div.display {margin-left: 3.2em}
  35. div.example {margin-left: 3.2em}
  36. div.lisp {margin-left: 3.2em}
  37. div.smalldisplay {margin-left: 3.2em}
  38. div.smallexample {margin-left: 3.2em}
  39. div.smalllisp {margin-left: 3.2em}
  40. kbd {font-style: oblique}
  41. pre.display {font-family: inherit}
  42. pre.format {font-family: inherit}
  43. pre.menu-comment {font-family: serif}
  44. pre.menu-preformatted {font-family: serif}
  45. pre.smalldisplay {font-family: inherit; font-size: smaller}
  46. pre.smallexample {font-size: smaller}
  47. pre.smallformat {font-family: inherit; font-size: smaller}
  48. pre.smalllisp {font-size: smaller}
  49. span.nolinebreak {white-space: nowrap}
  50. span.roman {font-family: initial; font-weight: normal}
  51. span.sansserif {font-family: sans-serif; font-weight: normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en">
  57. <a name="Omissions-from-Ada"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="Additions-to-Ada.html#Additions-to-Ada" accesskey="n" rel="next">Additions to Ada</a>, Previous: <a href="Ada-Mode-Intro.html#Ada-Mode-Intro" accesskey="p" rel="prev">Ada Mode Intro</a>, Up: <a href="Ada.html#Ada" accesskey="u" rel="up">Ada</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  61. </div>
  62. <hr>
  63. <a name="Omissions-from-Ada-1"></a>
  64. <h4 class="subsubsection">15.4.10.2 Omissions from Ada</h4>
  65. <a name="index-Ada_002c-omissions-from"></a>
  66. <p>Here are the notable omissions from the subset:
  67. </p>
  68. <ul>
  69. <li> Only a subset of the attributes are supported:
  70. <ul class="no-bullet">
  71. <li>- <tt>'First</tt>, <tt>'Last</tt>, and <tt>'Length</tt>
  72. on array objects (not on types and subtypes).
  73. </li><li>- <tt>'Min</tt> and <tt>'Max</tt>.
  74. </li><li>- <tt>'Pos</tt> and <tt>'Val</tt>.
  75. </li><li>- <tt>'Tag</tt>.
  76. </li><li>- <tt>'Range</tt> on array objects (not subtypes), but only as the right
  77. operand of the membership (<code>in</code>) operator.
  78. </li><li>- <tt>'Access</tt>, <tt>'Unchecked_Access</tt>, and
  79. <tt>'Unrestricted_Access</tt> (a GNAT extension).
  80. </li><li>- <tt>'Address</tt>.
  81. </li></ul>
  82. </li><li> The names in
  83. <code>Characters.Latin_1</code> are not available and
  84. concatenation is not implemented. Thus, escape characters in strings are
  85. not currently available.
  86. </li><li> Equality tests (&lsquo;<samp>=</samp>&rsquo; and &lsquo;<samp>/=</samp>&rsquo;) on arrays test for bitwise
  87. equality of representations. They will generally work correctly
  88. for strings and arrays whose elements have integer or enumeration types.
  89. They may not work correctly for arrays whose element
  90. types have user-defined equality, for arrays of real values
  91. (in particular, IEEE-conformant floating point, because of negative
  92. zeroes and NaNs), and for arrays whose elements contain unused bits with
  93. indeterminate values.
  94. </li><li> The other component-by-component array operations (<code>and</code>, <code>or</code>,
  95. <code>xor</code>, <code>not</code>, and relational tests other than equality)
  96. are not implemented.
  97. </li><li> <a name="index-array-aggregates-_0028Ada_0029"></a>
  98. <a name="index-record-aggregates-_0028Ada_0029"></a>
  99. <a name="index-aggregates-_0028Ada_0029"></a>
  100. There is limited support for array and record aggregates. They are
  101. permitted only on the right sides of assignments, as in these examples:
  102. <div class="smallexample">
  103. <pre class="smallexample">(gdb) set An_Array := (1, 2, 3, 4, 5, 6)
  104. (gdb) set An_Array := (1, others =&gt; 0)
  105. (gdb) set An_Array := (0|4 =&gt; 1, 1..3 =&gt; 2, 5 =&gt; 6)
  106. (gdb) set A_2D_Array := ((1, 2, 3), (4, 5, 6), (7, 8, 9))
  107. (gdb) set A_Record := (1, &quot;Peter&quot;, True);
  108. (gdb) set A_Record := (Name =&gt; &quot;Peter&quot;, Id =&gt; 1, Alive =&gt; True)
  109. </pre></div>
  110. <p>Changing a
  111. discriminant&rsquo;s value by assigning an aggregate has an
  112. undefined effect if that discriminant is used within the record.
  113. However, you can first modify discriminants by directly assigning to
  114. them (which normally would not be allowed in Ada), and then performing an
  115. aggregate assignment. For example, given a variable <code>A_Rec</code>
  116. declared to have a type such as:
  117. </p>
  118. <div class="smallexample">
  119. <pre class="smallexample">type Rec (Len : Small_Integer := 0) is record
  120. Id : Integer;
  121. Vals : IntArray (1 .. Len);
  122. end record;
  123. </pre></div>
  124. <p>you can assign a value with a different size of <code>Vals</code> with two
  125. assignments:
  126. </p>
  127. <div class="smallexample">
  128. <pre class="smallexample">(gdb) set A_Rec.Len := 4
  129. (gdb) set A_Rec := (Id =&gt; 42, Vals =&gt; (1, 2, 3, 4))
  130. </pre></div>
  131. <p>As this example also illustrates, <small>GDB</small> is very loose about the usual
  132. rules concerning aggregates. You may leave out some of the
  133. components of an array or record aggregate (such as the <code>Len</code>
  134. component in the assignment to <code>A_Rec</code> above); they will retain their
  135. original values upon assignment. You may freely use dynamic values as
  136. indices in component associations. You may even use overlapping or
  137. redundant component associations, although which component values are
  138. assigned in such cases is not defined.
  139. </p>
  140. </li><li> Calls to dispatching subprograms are not implemented.
  141. </li><li> The overloading algorithm is much more limited (i.e., less selective)
  142. than that of real Ada. It makes only limited use of the context in
  143. which a subexpression appears to resolve its meaning, and it is much
  144. looser in its rules for allowing type matches. As a result, some
  145. function calls will be ambiguous, and the user will be asked to choose
  146. the proper resolution.
  147. </li><li> The <code>new</code> operator is not implemented.
  148. </li><li> Entry calls are not implemented.
  149. </li><li> Aside from printing, arithmetic operations on the native VAX floating-point
  150. formats are not supported.
  151. </li><li> It is not possible to slice a packed array.
  152. </li><li> The names <code>True</code> and <code>False</code>, when not part of a qualified name,
  153. are interpreted as if implicitly prefixed by <code>Standard</code>, regardless of
  154. context.
  155. Should your program
  156. redefine these names in a package or procedure (at best a dubious practice),
  157. you will have to use fully qualified names to access their new definitions.
  158. </li></ul>
  159. <hr>
  160. <div class="header">
  161. <p>
  162. Next: <a href="Additions-to-Ada.html#Additions-to-Ada" accesskey="n" rel="next">Additions to Ada</a>, Previous: <a href="Ada-Mode-Intro.html#Ada-Mode-Intro" accesskey="p" rel="prev">Ada Mode Intro</a>, Up: <a href="Ada.html#Ada" accesskey="u" rel="up">Ada</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  163. </div>
  164. </body>
  165. </html>