<HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.51 from ProgrammersManual.texinfo on 4 March 1997 --> <TITLE>LambdaMOO Programmer's Manual - Delimiters</TITLE> </HEAD> <BODY> Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_57.html">previous</A>, <A HREF="ProgrammersManual_59.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>. <P><HR><P> <H3><A NAME="SEC58" HREF="ProgrammersManual_toc.html#TOC58">Command-Output Delimiters</A></H3> <P> Every MOO network connection has associated with it two strings, the <STRONG>output prefix</STRONG> and the <STRONG>output suffix</STRONG>. Just before executing a command typed on that connection, the server prints the output prefix, if any, to the player. Similarly, just after finishing the command, the output suffix, if any, is printed to the player. Initially, these strings are not defined, so no extra printing takes place. </P> <P> The <CODE>PREFIX</CODE> and <CODE>SUFFIX</CODE> commands are used to set and clear these strings. They have the following simple syntax: </P> <PRE> PREFIX <VAR>output-prefix</VAR> SUFFIX <VAR>output-suffix</VAR> </PRE> <P> That is, all text after the command name and any following spaces is used as the new value of the appropriate string. If there is no non-blank text after the command string, then the corresponding string is cleared. For compatibility with some general MUD client programs, the server also recognizes <CODE>OUTPUTPREFIX</CODE> as a synonym for <CODE>PREFIX</CODE> and <CODE>OUTPUTSUFFIX</CODE> as a synonym for <CODE>SUFFIX</CODE>. </P> <P> These commands are intended for use by programs connected to the MOO, so that they can issue MOO commands and reliably determine the beginning and end of the resulting output. For example, one editor-based client program sends this sequence of commands on occasion: </P> <PRE> PREFIX >>MOO-Prefix<< SUFFIX >>MOO-Suffix<< @list <VAR>object</VAR>:<VAR>verb</VAR> without numbers PREFIX SUFFIX </PRE> <P> The effect of which, in a LambdaCore-derived database, is to print out the code for the named verb preceded by a line containing only <SAMP>`>>MOO-Prefix<<'</SAMP> and followed by a line containing only <SAMP>`>>MOO-Suffix<<'</SAMP>. This enables the editor to reliably extract the program text from the MOO output and show it to the user in a separate editor window. There are many other possible uses. </P> <P> The built-in function <CODE>output_delimiters()</CODE> can be used by MOO code to find out the output prefix and suffix currently in effect on a particular network connection. </P> <P><HR><P> Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_57.html">previous</A>, <A HREF="ProgrammersManual_59.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>. </BODY> </HTML>