1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
<TITLE>lib</TITLE>
<SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
<STYLE TYPE="text/css">
<!--
.REFBODY { margin-left: 13mm }
.REFTYPES { margin-left: 8mm }
-->
</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
ALINK="#FF0000">
<!-- refpage -->
<CENTER>
<A HREF="http://www.erlang.se">
<IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif">
</A>
<H1>lib</H1>
</CENTER>
<H3>MODULE</H3>
<DIV CLASS=REFBODY>
lib
</DIV>
<H3>MODULE SUMMARY</H3>
<DIV CLASS=REFBODY>
A number of useful library functions
</DIV>
<H3>DESCRIPTION</H3>
<DIV CLASS=REFBODY>
<P>
<TABLE CELLPADDING=4>
<TR>
<TD VALIGN=TOP><IMG ALT="Warning!" SRC="warning.gif"></TD>
<TD>
<P>This module is retained for compatibility. It may disappear
without warning in a future release. </TD>
</TR>
</TABLE>
</DIV>
<H3>EXPORTS</H3>
<P><A NAME="flush_receive/0"><STRONG><CODE>flush_receive() -> void()</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY>
<P>Flushes the message buffer of the current process.
</DIV>
<P><A NAME="error_message/2"><STRONG><CODE>error_message(Format, Args) -> ok</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Format = string()</CODE></STRONG><BR>
<STRONG><CODE>Args = [term()]</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P>Prints error message <CODE>Args</CODE> in accordance with
<CODE>Format</CODE>. Similar to <CODE>io:format/2</CODE>, see
<A HREF="io.html#fwrite/1">io(3)</A>.
</DIV>
<P><A NAME="progname/0"><STRONG><CODE>progname() -> atom()</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY>
<P>Returns the name of the script that started the current
Erlang session.
</DIV>
<P><A NAME="nonl/1"><STRONG><CODE>nonl(String1) -> String2</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>String1 = String2 = string()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P>Removes the last newline character, if any, in
<CODE>String1</CODE>.
</DIV>
<P><A NAME="send/2"><STRONG><CODE>send(To, Msg)</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>To = pid() | Name | {Name,Node}</CODE></STRONG><BR>
<STRONG><CODE>Name = Node = atom()</CODE></STRONG><BR>
<STRONG><CODE>Msg = term()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P>This function to makes it possible to send a message using
the <CODE>apply/3</CODE> BIF.
</DIV>
<P><A NAME="sendw/2"><STRONG><CODE>sendw(To, Msg)</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>To = pid() | Name | {Name,Node}</CODE></STRONG><BR>
<STRONG><CODE>Name = Node = atom()</CODE></STRONG><BR>
<STRONG><CODE>Msg = term()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<P>As <CODE>send/2</CODE>, but waits for an answer. It is implemented
as follows:
<PRE>
sendw(To, Msg) ->
To ! {self(),Msg},
receive
Reply -> Reply
end.
</PRE>
<P>The message returned is not necessarily a reply to the
message sent.
</DIV>
<H3>AUTHORS</H3>
<DIV CLASS=REFBODY>
Robert Virding - support@erlang.ericsson.se<BR>
</DIV>
<CENTER>
<HR>
<SMALL>stdlib 1.14.2<BR>
Copyright © 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>
|