/usr/share/mozart/doc/base/dictionary.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>9.3 Dictionaries</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="array.html#section.chunks.arrays"><< Prev</A></TD><TD><A href="node11.html">- Up -</A></TD><TD><A href="weakdictionary.html#section.chunks.weakdictionaries">Next >></A></TD></TR></TABLE><DIV id="section.chunks.dictionaries"><H2><A name="section.chunks.dictionaries">9.3 Dictionaries</A></H2><P> The module <A name="label527"></A><SPAN class="index"><CODE>Dictionary</CODE></SPAN> contains procedures operating on dictionaries. If a dictionary contains an item under some key <CODE><I>LI</I></CODE>, we say <CODE><I>LI</I></CODE> is a <EM>valid key</EM>. Whenever a dictionary access is indexed with an ill-typed key, a type error is raised. For a missing but well-typed key, a system exception is raised. </P><DL><DT><A name="label528"></A><SPAN class="index"><CODE>IsDictionary</CODE></SPAN> <A name="label530"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>is </CODE><CODE>+<I>X</I></CODE><CODE> </CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>X</I></CODE> is a dictionary. </P></DD><DT><A name="label531"></A><SPAN class="index"><CODE>NewDictionary</CODE></SPAN> <A name="label533"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>new </CODE><CODE>?<I>Dictionary</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns a new empty dictionary. </P></DD><DT><CODE>put</CODE> <A name="label535"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>put </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>+<I>LI</I></CODE><CODE> </CODE><CODE><I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>sets the item in <CODE><I>Dictionary</I></CODE> under key <CODE><I>LI</I></CODE> to <CODE><I>X</I></CODE>. </P></DD><DT><CODE>get</CODE> <A name="label537"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>get </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>+<I>LI</I></CODE><CODE> </CODE><CODE><I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns the item <CODE><I>X</I></CODE> of <CODE><I>Dictionary</I></CODE> under key <CODE><I>LI</I></CODE>. </P></DD><DT><CODE>condGet</CODE> <A name="label539"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>condGet </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>+<I>LI</I></CODE><CODE> </CODE><CODE><I>DefVal</I></CODE><CODE> </CODE><CODE><I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns the item <CODE><I>X</I></CODE> of <CODE><I>Dictionary</I></CODE> under key <CODE><I>LI</I></CODE>, if <CODE><I>LI</I></CODE> is a valid key of <CODE><I>Dictionary</I></CODE>. Otherwise, returns <CODE><I>DefVal</I></CODE>. </P></DD><DT><CODE>exchange</CODE> <A name="label541"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>exchange </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>+<I>LI</I></CODE><CODE> </CODE><CODE><I>OldVal</I></CODE><CODE> </CODE><CODE><I>NewVal</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns the current value of <CODE><I>Dictionary</I></CODE> under key <CODE><I>LI</I></CODE> as item <CODE><I>OldVal</I></CODE> and updates the value of <CODE><I>Dictionary</I></CODE> under key <CODE><I>LI</I></CODE> to be <CODE><I>NewVal</I></CODE>. </P></DD><DT><CODE>condExchange</CODE> <A name="label543"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>condExchange </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>+<I>LI</I></CODE><CODE> </CODE><CODE><I>DefVal</I></CODE><CODE> <BR> </CODE><CODE><I>OldVal</I></CODE><CODE> </CODE><CODE><I>NewVal</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>If <CODE><I>LI</I></CODE> is a valid key of <CODE><I>Dictionary</I></CODE> then returns the current value of <CODE><I>Dictionary</I></CODE> under key <CODE><I>LI</I></CODE> as item <CODE><I>OldVal</I></CODE> otherwise, returns <CODE><I>DefVal</I></CODE> as item <CODE><I>OldVal</I></CODE>. Sets the value of <CODE><I>Dictionary</I></CODE> under key <CODE><I>LI</I></CODE> to be <CODE><I>NewVal</I></CODE>. </P></DD><DT><CODE>keys</CODE> <A name="label545"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>keys </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>?<I>LIs</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns a list of all currently valid keys of <CODE><I>Dictionary</I></CODE>. </P></DD><DT><CODE>entries</CODE> <A name="label547"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>entries </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>?<I>Ts</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns the list of current entries of <CODE><I>Dictionary</I></CODE>. An entry is a pair <CODE><I>LI</I></CODE><CODE><SPAN class="keyword">#</SPAN></CODE><CODE><I>X</I></CODE>, where <CODE><I>LI</I></CODE> is a valid key of <CODE><I>Dictionary</I></CODE> and <CODE><I>X</I></CODE> the corresponding item. </P></DD><DT><CODE>items</CODE> <A name="label549"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>items </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>?<I>Xs</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns the list of all items currently in <CODE><I>Dictionary</I></CODE>. </P></DD><DT><CODE>isEmpty</CODE> <A name="label551"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>isEmpty </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>Dictionary</I></CODE> currently contains an entry. </P></DD><DT><CODE>remove</CODE> <A name="label553"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>remove </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>+<I>LI</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>removes the item under key <CODE><I>LI</I></CODE> from <CODE><I>Dictionary</I></CODE> if <CODE><I>LI</I></CODE> is a valid key. Otherwise, does nothing. </P></DD><DT><CODE>removeAll</CODE> <A name="label555"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>removeAll </CODE><CODE>+<I>Dictionary</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>removes all entries currently in <CODE><I>Dictionary</I></CODE>. </P></DD><DT><CODE>member</CODE> <A name="label557"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>member </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>+<I>LI</I></CODE><CODE> </CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>LI</I></CODE> is a valid key of <CODE><I>Dictionary</I></CODE>. </P></DD><DT><CODE>clone</CODE> <A name="label559"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>clone </CODE><CODE>+<I>Dictionary1</I></CODE><CODE> </CODE><CODE>?<I>Dictionary2</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns a new dictionary <CODE><I>Dictionary2</I></CODE> containing the currently valid keys and corresponding items of <CODE><I>Dictionary1</I></CODE>. </P></DD><DT><CODE>toRecord</CODE> <A name="label561"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Dictionary<SPAN class="keyword">.</SPAN>toRecord </CODE><CODE>+<I>L</I></CODE><CODE> </CODE><CODE>+<I>Dictionary</I></CODE><CODE> </CODE><CODE>?<I>R</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns a record <CODE><I>R</I></CODE> with label <CODE><I>L</I></CODE> whose features and their fields correspond to the keys and their entries of <CODE><I>Dictionary</I></CODE>. </P></DD><DT><CODE>weak</CODE> <A name="label563"></A> </DT><DD><P>another way to access module <CODE>WeakDictionary</CODE> (see <A href="weakdictionary.html#section.chunks.weakdictionaries">Section 9.4</A>). </P></DD></DL><P> </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="array.html#section.chunks.arrays"><< Prev</A></TD><TD><A href="node11.html">- Up -</A></TD><TD><A href="weakdictionary.html#section.chunks.weakdictionaries">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif Kornstaedt</A> and <A href="http://www.ps.uni-sb.de/~schulte/">Christian Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|