/usr/share/mozart/doc/op/node4.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>2.2 Virtual Strings</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="node3.html#section.data.strings"><< Prev</A></TD><TD><A href="node2.html">- Up -</A></TD></TR></TABLE><DIV id="section.data.virtualstrings"><H2><A name="section.data.virtualstrings">2.2 Virtual Strings</A></H2><P> The data to be sent or to be written consists of a sequence of integers, atoms, floats, and strings. If only strings were allowed to be sent as information, the data would have to be transformed into a string. This would be clumsy and inefficient with regard to both space and time. </P><P> Mozart uses <A name="label32"></A><EM>virtual strings</EM><A name="label33"></A> for this purpose instead. A virtual string is either an atom, a float, an integer, a string, or a tuple with label <CODE><SPAN class="string">'#'</SPAN></CODE>, whose subtrees are virtual strings themselves. For instance, </P><BLOCKQUOTE class="code"><CODE>12<SPAN class="keyword">#</SPAN>(2<SPAN class="keyword">#</SPAN>fast<SPAN class="keyword">#</SPAN>4<SPAN class="keyword">#</SPAN><SPAN class="string">"U"</SPAN>)<SPAN class="keyword">#~</SPAN>3<SPAN class="keyword">.</SPAN>1415</CODE></BLOCKQUOTE><P> is a virtual string. In the above example it is quite clear, that <CODE><SPAN class="keyword">#</SPAN></CODE> stands for concatenation (i. e., for <EM>virtual</EM> concatenation). </P><P> There is predefined functionality for virtual strings, like testing, by <A name="label34"></A><SPAN class="index"><CODE>IsVirtualString</CODE></SPAN>, converting to a string, by <CODE>VirtualString<SPAN class="keyword">.</SPAN>toString</CODE><A name="label36"></A>, and changing of signs, by <CODE>VirtualString<SPAN class="keyword">.</SPAN>changeSign</CODE><A name="label38"></A>. The latter procedure is quite important, because </P><DL class="anonymous"><DD class="code"><CODE>{Browse 12<SPAN class="keyword">#</SPAN>(2<SPAN class="keyword">#</SPAN>fast<SPAN class="keyword">#</SPAN>4<SPAN class="keyword">#</SPAN><SPAN class="string">"U"</SPAN>)<SPAN class="keyword">#~</SPAN>3<SPAN class="keyword">.</SPAN>1415}</CODE></DD></DL><P> reveals that the usual unary minus sign (i. e., <CODE><SPAN class="keyword">-</SPAN></CODE>) is used rather than the Oz operator <CODE><SPAN class="keyword">~</SPAN></CODE>. </P><P> The procedure <CODE>VirtualString<SPAN class="keyword">.</SPAN>changeSign</CODE> provides the possibility to choose any virtual string as minus sign in numbers. It takes as input arguments two virtual strings, and substitutes every occurrence of the <CODE><SPAN class="keyword">-</SPAN></CODE> character as a unary minus sign in numbers of the first argument by the second argument. For example, </P><DL class="anonymous"><DD class="code"><CODE>{VirtualString<SPAN class="keyword">.</SPAN>changeSign 12<SPAN class="keyword">#</SPAN>(2<SPAN class="keyword">#</SPAN>fast<SPAN class="keyword">#</SPAN>4<SPAN class="keyword">#</SPAN><SPAN class="string">"U"</SPAN>)<SPAN class="keyword">#~</SPAN>3<SPAN class="keyword">.</SPAN>1415 <SPAN class="string">'~'</SPAN>}</CODE></DD></DL><P> returns the virtual string with the Oz-style unary minus sign. </P><P> Note that in order to display virtual strings in readable form in the Oz Browser, you have to configure the <SPAN class="menu">Representation, Type</SPAN> option, see also <A href="../browser/index.html">``The Oz Browser''</A>. In the following we assume that the Browser is configured for displaying virtual strings. </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node3.html#section.data.strings"><< Prev</A></TD><TD><A href="node2.html">- Up -</A></TD></TR></TABLE><HR><ADDRESS><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>
|