Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / gdb / Built-In-Func-Proc.html
blobbec2b529c9c2bbf8721e3971589aee2dc15f359a
1 <html lang="en">
2 <head>
3 <title>Debugging with GDB</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="Debugging with GDB">
6 <meta name="generator" content="makeinfo 4.3">
7 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Built-In%20Func%2fProc">Built-In Func/Proc</a>,
13 Next:<a rel="next" accesskey="n" href="M2-Constants.html#M2%20Constants">M2 Constants</a>,
14 Previous:<a rel="previous" accesskey="p" href="M2-Operators.html#M2%20Operators">M2 Operators</a>,
15 Up:<a rel="up" accesskey="u" href="Modula-2.html#Modula-2">Modula-2</a>
16 <hr><br>
17 </div>
19 <h5 class="subsubsection">Built-in functions and procedures</h5>
21 <p>Modula-2 also makes available several built-in procedures and functions.
22 In describing these, the following metavariables are used:
24 <dl>
26 <br><dt><var>a</var>
27 <dd>represents an <code>ARRAY</code> variable.
29 <br><dt><var>c</var>
30 <dd>represents a <code>CHAR</code> constant or variable.
32 <br><dt><var>i</var>
33 <dd>represents a variable or constant of integral type.
35 <br><dt><var>m</var>
36 <dd>represents an identifier that belongs to a set. Generally used in the
37 same function with the metavariable <var>s</var>. The type of <var>s</var> should
38 be <code>SET OF </code><var>mtype</var><code></code> (where <var>mtype</var> is the type of <var>m</var>).
40 <br><dt><var>n</var>
41 <dd>represents a variable or constant of integral or floating-point type.
43 <br><dt><var>r</var>
44 <dd>represents a variable or constant of floating-point type.
46 <br><dt><var>t</var>
47 <dd>represents a type.
49 <br><dt><var>v</var>
50 <dd>represents a variable.
52 <br><dt><var>x</var>
53 <dd>represents a variable or constant of one of many types. See the
54 explanation of the function for details.
55 </dl>
57 <p>All Modula-2 built-in procedures also return a result, described below.
59 <dl>
60 <dt><code>ABS(</code><var>n</var><code>)</code>
61 <dd>Returns the absolute value of <var>n</var>.
63 <br><dt><code>CAP(</code><var>c</var><code>)</code>
64 <dd>If <var>c</var> is a lower case letter, it returns its upper case
65 equivalent, otherwise it returns its argument.
67 <br><dt><code>CHR(</code><var>i</var><code>)</code>
68 <dd>Returns the character whose ordinal value is <var>i</var>.
70 <br><dt><code>DEC(</code><var>v</var><code>)</code>
71 <dd>Decrements the value in the variable <var>v</var> by one. Returns the new value.
73 <br><dt><code>DEC(</code><var>v</var><code>,</code><var>i</var><code>)</code>
74 <dd>Decrements the value in the variable <var>v</var> by <var>i</var>. Returns the
75 new value.
77 <br><dt><code>EXCL(</code><var>m</var><code>,</code><var>s</var><code>)</code>
78 <dd>Removes the element <var>m</var> from the set <var>s</var>. Returns the new
79 set.
81 <br><dt><code>FLOAT(</code><var>i</var><code>)</code>
82 <dd>Returns the floating point equivalent of the integer <var>i</var>.
84 <br><dt><code>HIGH(</code><var>a</var><code>)</code>
85 <dd>Returns the index of the last member of <var>a</var>.
87 <br><dt><code>INC(</code><var>v</var><code>)</code>
88 <dd>Increments the value in the variable <var>v</var> by one. Returns the new value.
90 <br><dt><code>INC(</code><var>v</var><code>,</code><var>i</var><code>)</code>
91 <dd>Increments the value in the variable <var>v</var> by <var>i</var>. Returns the
92 new value.
94 <br><dt><code>INCL(</code><var>m</var><code>,</code><var>s</var><code>)</code>
95 <dd>Adds the element <var>m</var> to the set <var>s</var> if it is not already
96 there. Returns the new set.
98 <br><dt><code>MAX(</code><var>t</var><code>)</code>
99 <dd>Returns the maximum value of the type <var>t</var>.
101 <br><dt><code>MIN(</code><var>t</var><code>)</code>
102 <dd>Returns the minimum value of the type <var>t</var>.
104 <br><dt><code>ODD(</code><var>i</var><code>)</code>
105 <dd>Returns boolean TRUE if <var>i</var> is an odd number.
107 <br><dt><code>ORD(</code><var>x</var><code>)</code>
108 <dd>Returns the ordinal value of its argument. For example, the ordinal
109 value of a character is its <small>ASCII</small> value (on machines supporting the
110 <small>ASCII</small> character set). <var>x</var> must be of an ordered type, which include
111 integral, character and enumerated types.
113 <br><dt><code>SIZE(</code><var>x</var><code>)</code>
114 <dd>Returns the size of its argument. <var>x</var> can be a variable or a type.
116 <br><dt><code>TRUNC(</code><var>r</var><code>)</code>
117 <dd>Returns the integral part of <var>r</var>.
119 <br><dt><code>VAL(</code><var>t</var><code>,</code><var>i</var><code>)</code>
120 <dd>Returns the member of the type <var>t</var> whose ordinal value is <var>i</var>.
121 </dl>
123 <blockquote>
124 <em>Warning:</em> Sets and their operations are not yet supported, so
125 GDB treats the use of procedures <code>INCL</code> and <code>EXCL</code> as
126 an error.
127 </blockquote>
129 </body></html>