19962013 Ericsson AB. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. lib
lib A number of useful library functions

This module is retained for compatibility. It may disappear without warning in a future release.

Flush messages

Flushes the message buffer of the current process.

Print error message

Prints error message Args in accordance with Format. Similar to io:format/2, see io(3).

Return name of Erlang start script

Returns the name of the script that started the current Erlang session.

Remove last newline

Removes the last newline character, if any, in String1.

Send a message

This function to makes it possible to send a message using the apply/3 BIF.

Send a message and wait for an answer

As send/2, but waits for an answer. It is implemented as follows:

sendw(To, Msg) -> To ! {self(),Msg}, receive Reply -> Reply end.

The message returned is not necessarily a reply to the message sent.