Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

192 Zeilen
7.2KB

  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>Arithmetic In Guile (Debugging with GDB)</title>
  17. <meta name="description" content="Arithmetic In Guile (Debugging with GDB)">
  18. <meta name="keywords" content="Arithmetic In Guile (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="Guile-API.html#Guile-API" rel="up" title="Guile API">
  26. <link href="Types-In-Guile.html#Types-In-Guile" rel="next" title="Types In Guile">
  27. <link href="Values-From-Inferior-In-Guile.html#Values-From-Inferior-In-Guile" rel="prev" title="Values From Inferior In Guile">
  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="Arithmetic-In-Guile"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="Types-In-Guile.html#Types-In-Guile" accesskey="n" rel="next">Types In Guile</a>, Previous: <a href="Values-From-Inferior-In-Guile.html#Values-From-Inferior-In-Guile" accesskey="p" rel="prev">Values From Inferior In Guile</a>, Up: <a href="Guile-API.html#Guile-API" accesskey="u" rel="up">Guile API</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="Arithmetic-In-Guile-1"></a>
  64. <h4 class="subsubsection">23.3.3.6 Arithmetic In Guile</h4>
  65. <p>The <code>(gdb)</code> module provides several functions for performing
  66. arithmetic on <code>&lt;gdb:value&gt;</code> objects.
  67. The arithmetic is performed as if it were done by the target,
  68. and therefore has target semantics which are not necessarily
  69. those of Scheme. For example operations work with a fixed precision,
  70. not the arbitrary precision of Scheme.
  71. </p>
  72. <p>Wherever a function takes an integer or pointer as an operand,
  73. <small>GDB</small> will convert appropriate Scheme values to perform
  74. the operation.
  75. </p>
  76. <dl>
  77. <dt><a name="index-value_002dadd"></a>Scheme Procedure: <strong>value-add</strong> <em>a b</em></dt>
  78. </dl>
  79. <dl>
  80. <dt><a name="index-value_002dsub"></a>Scheme Procedure: <strong>value-sub</strong> <em>a b</em></dt>
  81. </dl>
  82. <dl>
  83. <dt><a name="index-value_002dmul"></a>Scheme Procedure: <strong>value-mul</strong> <em>a b</em></dt>
  84. </dl>
  85. <dl>
  86. <dt><a name="index-value_002ddiv"></a>Scheme Procedure: <strong>value-div</strong> <em>a b</em></dt>
  87. </dl>
  88. <dl>
  89. <dt><a name="index-value_002drem"></a>Scheme Procedure: <strong>value-rem</strong> <em>a b</em></dt>
  90. </dl>
  91. <dl>
  92. <dt><a name="index-value_002dmod"></a>Scheme Procedure: <strong>value-mod</strong> <em>a b</em></dt>
  93. </dl>
  94. <dl>
  95. <dt><a name="index-value_002dpow"></a>Scheme Procedure: <strong>value-pow</strong> <em>a b</em></dt>
  96. </dl>
  97. <dl>
  98. <dt><a name="index-value_002dnot"></a>Scheme Procedure: <strong>value-not</strong> <em>a</em></dt>
  99. </dl>
  100. <dl>
  101. <dt><a name="index-value_002dneg"></a>Scheme Procedure: <strong>value-neg</strong> <em>a</em></dt>
  102. </dl>
  103. <dl>
  104. <dt><a name="index-value_002dpos"></a>Scheme Procedure: <strong>value-pos</strong> <em>a</em></dt>
  105. </dl>
  106. <dl>
  107. <dt><a name="index-value_002dabs"></a>Scheme Procedure: <strong>value-abs</strong> <em>a</em></dt>
  108. </dl>
  109. <dl>
  110. <dt><a name="index-value_002dlsh"></a>Scheme Procedure: <strong>value-lsh</strong> <em>a b</em></dt>
  111. </dl>
  112. <dl>
  113. <dt><a name="index-value_002drsh"></a>Scheme Procedure: <strong>value-rsh</strong> <em>a b</em></dt>
  114. </dl>
  115. <dl>
  116. <dt><a name="index-value_002dmin"></a>Scheme Procedure: <strong>value-min</strong> <em>a b</em></dt>
  117. </dl>
  118. <dl>
  119. <dt><a name="index-value_002dmax"></a>Scheme Procedure: <strong>value-max</strong> <em>a b</em></dt>
  120. </dl>
  121. <dl>
  122. <dt><a name="index-value_002dlognot"></a>Scheme Procedure: <strong>value-lognot</strong> <em>a</em></dt>
  123. </dl>
  124. <dl>
  125. <dt><a name="index-value_002dlogand"></a>Scheme Procedure: <strong>value-logand</strong> <em>a b</em></dt>
  126. </dl>
  127. <dl>
  128. <dt><a name="index-value_002dlogior"></a>Scheme Procedure: <strong>value-logior</strong> <em>a b</em></dt>
  129. </dl>
  130. <dl>
  131. <dt><a name="index-value_002dlogxor"></a>Scheme Procedure: <strong>value-logxor</strong> <em>a b</em></dt>
  132. </dl>
  133. <dl>
  134. <dt><a name="index-value_003d_003f"></a>Scheme Procedure: <strong>value=?</strong> <em>a b</em></dt>
  135. </dl>
  136. <dl>
  137. <dt><a name="index-value_003c_003f"></a>Scheme Procedure: <strong>value&lt;?</strong> <em>a b</em></dt>
  138. </dl>
  139. <dl>
  140. <dt><a name="index-value_003c_003d_003f"></a>Scheme Procedure: <strong>value&lt;=?</strong> <em>a b</em></dt>
  141. </dl>
  142. <dl>
  143. <dt><a name="index-value_003e_003f"></a>Scheme Procedure: <strong>value&gt;?</strong> <em>a b</em></dt>
  144. </dl>
  145. <dl>
  146. <dt><a name="index-value_003e_003d_003f"></a>Scheme Procedure: <strong>value&gt;=?</strong> <em>a b</em></dt>
  147. </dl>
  148. <p>Scheme does not provide a <code>not-equal</code> function,
  149. and thus Guile support in <small>GDB</small> does not either.
  150. </p>
  151. <hr>
  152. <div class="header">
  153. <p>
  154. Next: <a href="Types-In-Guile.html#Types-In-Guile" accesskey="n" rel="next">Types In Guile</a>, Previous: <a href="Values-From-Inferior-In-Guile.html#Values-From-Inferior-In-Guile" accesskey="p" rel="prev">Values From Inferior In Guile</a>, Up: <a href="Guile-API.html#Guile-API" accesskey="u" rel="up">Guile API</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>
  155. </div>
  156. </body>
  157. </html>