~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/stdlib/doc/src/lib.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (1.1.13 upstream)
  • mto: (3.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20090215164252-dxpjjuq108nz4noa
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="latin1" ?>
 
2
<!DOCTYPE erlref SYSTEM "erlref.dtd">
 
3
 
 
4
<erlref>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>1996</year>
 
8
      <year>2007</year>
 
9
      <holder>Ericsson AB, All Rights Reserved</holder>
 
10
    </copyright>
 
11
    <legalnotice>
 
12
  The contents of this file are subject to the Erlang Public License,
 
13
  Version 1.1, (the "License"); you may not use this file except in
 
14
  compliance with the License. You should have received a copy of the
 
15
  Erlang Public License along with this software. If not, it can be
 
16
  retrieved online at http://www.erlang.org/.
 
17
 
 
18
  Software distributed under the License is distributed on an "AS IS"
 
19
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
20
  the License for the specific language governing rights and limitations
 
21
  under the License.
 
22
 
 
23
  The Initial Developer of the Original Code is Ericsson AB.
 
24
    </legalnotice>
 
25
 
 
26
    <title>lib</title>
 
27
    <prepared></prepared>
 
28
    <docno></docno>
 
29
    <date></date>
 
30
    <rev></rev>
 
31
  </header>
 
32
  <module>lib</module>
 
33
  <modulesummary>A number of useful library functions</modulesummary>
 
34
  <description>
 
35
    <warning>
 
36
      <p>This module is retained for compatibility. It may disappear
 
37
        without warning in a future release.</p>
 
38
    </warning>
 
39
  </description>
 
40
  <funcs>
 
41
    <func>
 
42
      <name>flush_receive() -> void()</name>
 
43
      <fsummary>Flush messages</fsummary>
 
44
      <desc>
 
45
        <p>Flushes the message buffer of the current process.</p>
 
46
      </desc>
 
47
    </func>
 
48
    <func>
 
49
      <name>error_message(Format, Args) -> ok</name>
 
50
      <fsummary>Print error message</fsummary>
 
51
      <type>
 
52
        <v>Format = atom() | string() | binary()</v>
 
53
        <v>Args = [term()]</v>
 
54
      </type>
 
55
      <desc>
 
56
        <p>Prints error message <c>Args</c> in accordance with
 
57
          <c>Format</c>. Similar to <c>io:format/2</c>, see
 
58
          <seealso marker="io#fwrite/1">io(3)</seealso>.</p>
 
59
      </desc>
 
60
    </func>
 
61
    <func>
 
62
      <name>progname() -> atom()</name>
 
63
      <fsummary>Return name of Erlang start script</fsummary>
 
64
      <desc>
 
65
        <p>Returns the name of the script that started the current
 
66
          Erlang session.</p>
 
67
      </desc>
 
68
    </func>
 
69
    <func>
 
70
      <name>nonl(String1) -> String2</name>
 
71
      <fsummary>Remove last newline</fsummary>
 
72
      <type>
 
73
        <v>String1 = String2 = string()</v>
 
74
      </type>
 
75
      <desc>
 
76
        <p>Removes the last newline character, if any, in
 
77
          <c>String1</c>.</p>
 
78
      </desc>
 
79
    </func>
 
80
    <func>
 
81
      <name>send(To, Msg)</name>
 
82
      <fsummary>Send a message</fsummary>
 
83
      <type>
 
84
        <v>To = pid() | Name | {Name,Node}</v>
 
85
        <v>&nbsp;Name = Node = atom()</v>
 
86
        <v>Msg = term()</v>
 
87
      </type>
 
88
      <desc>
 
89
        <p>This function to makes it possible to send a message using
 
90
          the <c>apply/3</c> BIF.</p>
 
91
      </desc>
 
92
    </func>
 
93
    <func>
 
94
      <name>sendw(To, Msg)</name>
 
95
      <fsummary>Send a message and wait for an answer</fsummary>
 
96
      <type>
 
97
        <v>To = pid() | Name | {Name,Node}</v>
 
98
        <v>&nbsp;Name = Node = atom()</v>
 
99
        <v>Msg = term()</v>
 
100
      </type>
 
101
      <desc>
 
102
        <p>As <c>send/2</c>, but waits for an answer. It is implemented
 
103
          as follows:</p>
 
104
        <code type="none">
 
105
sendw(To, Msg) ->
 
106
    To ! {self(),Msg},
 
107
    receive
 
108
        Reply -> Reply
 
109
    end.</code>
 
110
        <p>The message returned is not necessarily a reply to the
 
111
          message sent.</p>
 
112
      </desc>
 
113
    </func>
 
114
  </funcs>
 
115
</erlref>
 
116