This file is indexed.

/usr/share/mozart/doc/base/int.html is in mozart-doc 1.4.0-8ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
2
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>4.2 Integers</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="number.html#section.numbers.general">&lt;&lt; Prev</A></TD><TD><A href="node6.html">- Up -</A></TD><TD><A href="float.html#section.numbers.floats">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="section.numbers.integers"><H2><A name="section.numbers.integers">4.2 Integers</A></H2><P> The module <A name="label68"></A><SPAN class="index"><CODE>Int</CODE></SPAN> contains procedures operating on integers. </P><DL><DT><A name="label69"></A><SPAN class="index"><CODE>IsInt</CODE></SPAN> <A name="label71"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Int<SPAN class="keyword">.</SPAN>is&nbsp;</CODE><CODE>+<I>X</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>X</I></CODE> is an integer. </P></DD><DT><A name="label72"></A><SPAN class="index"><CODE>IsNat</CODE></SPAN> <A name="label73"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Int<SPAN class="keyword">.</SPAN>isNat&nbsp;</CODE><CODE>+<I>I</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>I</I></CODE> is a natural number, i.&nbsp;e., an integer greater than or equal to&nbsp;<CODE>0</CODE>. </P></DD><DT><A name="label74"></A><SPAN class="index"><CODE>IsOdd</CODE></SPAN> <A name="label75"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Int<SPAN class="keyword">.</SPAN>isOdd&nbsp;</CODE><CODE>+<I>I</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>I</I></CODE> is an odd integer. </P></DD><DT><A name="label76"></A><SPAN class="index"><CODE>IsEven</CODE></SPAN> <A name="label77"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Int<SPAN class="keyword">.</SPAN>isEven&nbsp;</CODE><CODE>+<I>I</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>I</I></CODE> is an even integer. </P></DD><DT><A name="label78"></A><SPAN class="index"><CODE><SPAN class="keyword">div</SPAN></CODE></SPAN> <A name="label79"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Int<SPAN class="keyword">.</SPAN><SPAN class="string">'div'</SPAN>&nbsp;</CODE><CODE>+<I>I1</I></CODE><CODE>&nbsp;</CODE><CODE>+<I>I2</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>I3</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns <CODE><I>I1</I></CODE> integer-divided by&nbsp;<CODE><I>I2</I></CODE>, rounding towards&nbsp;<CODE>0</CODE>. <CODE>Int<SPAN class="keyword">.</SPAN><SPAN class="string">'div'</SPAN></CODE> can be defined as follows: </P><BLOCKQUOTE class="code"><CODE><SPAN class="keyword">local</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">fun</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">Div</SPAN>&nbsp;I1&nbsp;I2}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">case</SPAN>&nbsp;I1&nbsp;<SPAN class="keyword">&lt;</SPAN>&nbsp;I2&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;0&nbsp;<SPAN class="keyword">else</SPAN>&nbsp;1&nbsp;<SPAN class="keyword">+</SPAN>&nbsp;{Div&nbsp;I1&nbsp;<SPAN class="keyword">-</SPAN>&nbsp;I2&nbsp;I2}&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR><SPAN class="keyword">in</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">fun</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">Int.</SPAN><SPAN class="string">'div'</SPAN>&nbsp;I1&nbsp;I2}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{Div&nbsp;{Abs&nbsp;I1}&nbsp;{Abs&nbsp;I2}}&nbsp;<SPAN class="keyword">*</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">case</SPAN>&nbsp;I1&nbsp;<SPAN class="keyword">*</SPAN>&nbsp;I2&nbsp;<SPAN class="keyword">&gt;=</SPAN>&nbsp;0&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;1&nbsp;<SPAN class="keyword">else</SPAN>&nbsp;<SPAN class="keyword">~</SPAN>1&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR><SPAN class="keyword">end</SPAN></CODE></BLOCKQUOTE><P> </P></DD><DT><A name="label80"></A><SPAN class="index"><CODE><SPAN class="keyword">mod</SPAN></CODE></SPAN> <A name="label81"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Int<SPAN class="keyword">.</SPAN><SPAN class="string">'mod'</SPAN>&nbsp;</CODE><CODE>+<I>I1</I></CODE><CODE>&nbsp;</CODE><CODE>+<I>I2</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>I3</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns <CODE><I>I1</I></CODE> modulo&nbsp;<CODE><I>I2</I></CODE>. <CODE>Int<SPAN class="keyword">.</SPAN><SPAN class="string">'mod'</SPAN></CODE> can be defined as follows: </P><BLOCKQUOTE class="code"><CODE><SPAN class="keyword">fun</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">Int.</SPAN><SPAN class="string">'mod'</SPAN>&nbsp;I1&nbsp;I2}<BR>&nbsp;&nbsp;&nbsp;I1&nbsp;<SPAN class="keyword">-</SPAN>&nbsp;I2&nbsp;<SPAN class="keyword">*</SPAN>&nbsp;(I1&nbsp;<SPAN class="keyword">div</SPAN>&nbsp;I2)<BR><SPAN class="keyword">end</SPAN></CODE></BLOCKQUOTE><P> </P></DD><DT><A name="label82"></A><SPAN class="index"><CODE>IntToFloat</CODE></SPAN> <A name="label84"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Int<SPAN class="keyword">.</SPAN>toFloat&nbsp;</CODE><CODE>+<I>I</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>F</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns the float closest to the integer&nbsp;<CODE><I>I</I></CODE>. </P></DD><DT><A name="label85"></A><SPAN class="index"><CODE>IntToString</CODE></SPAN> <A name="label87"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Int<SPAN class="keyword">.</SPAN>toString&nbsp;</CODE><CODE>+<I>I</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>S</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns the string describing the integer&nbsp;<CODE><I>I</I></CODE> in Oz concrete syntax. </P></DD></DL><P> </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="number.html#section.numbers.general">&lt;&lt; Prev</A></TD><TD><A href="node6.html">- Up -</A></TD><TD><A href="float.html#section.numbers.floats">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys&nbsp;Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif&nbsp;Kornstaedt</A> and&nbsp;<A href="http://www.ps.uni-sb.de/~schulte/">Christian&nbsp;Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>