File: lib.3

package info (click to toggle)
erlang-manpages 1%3A12.b.3-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,188 kB
  • ctags: 2
  • sloc: makefile: 68; perl: 30; sh: 15
file content (102 lines) | stat: -rw-r--r-- 1,501 bytes parent folder | download
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
.TH lib 3 "stdlib  1.15.3" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
lib \- A number of useful library functions
.SH DESCRIPTION
.SS Warning:
.LP
This module is retained for compatibility\&. It may disappear without warning in a future release\&.


.SH EXPORTS
.LP
.B
flush_receive() -> void()
.br
.RS
.LP
Flushes the message buffer of the current process\&.
.RE
.LP
.B
error_message(Format, Args) -> ok
.br
.RS
.TP
Types
Format = atom() | string() | binary()
.br
Args = [term()]
.br
.RE
.RS
.LP
Prints error message \fIArgs\fR in accordance with \fIFormat\fR\&. Similar to \fIio:format/2\fR, see io(3)\&.
.RE
.LP
.B
progname() -> atom()
.br
.RS
.LP
Returns the name of the script that started the current Erlang session\&.
.RE
.LP
.B
nonl(String1) -> String2
.br
.RS
.TP
Types
String1 = String2 = string()
.br
.RE
.RS
.LP
Removes the last newline character, if any, in \fIString1\fR\&.
.RE
.LP
.B
send(To, Msg)
.br
.RS
.TP
Types
To = pid() | Name | {Name, Node}
.br
Name = Node = atom()
.br
Msg = term()
.br
.RE
.RS
.LP
This function to makes it possible to send a message using the \fIapply/3\fR BIF\&.
.RE
.LP
.B
sendw(To, Msg)
.br
.RS
.TP
Types
To = pid() | Name | {Name, Node}
.br
Name = Node = atom()
.br
Msg = term()
.br
.RE
.RS
.LP
As \fIsend/2\fR, but waits for an answer\&. It is implemented as follows:

.nf
sendw(To, Msg) ->
    To ! {self(),Msg},
    receive
        Reply -> Reply
    end\&.
.fi
.LP
The message returned is not necessarily a reply to the message sent\&.
.RE