The module is the basic unit of code for Erlang, and the Erl file is compiled with the. Beam as the extension, with the UTF8 character set, the. erl file is indicated as follows:-module (the module name, same as the file name of the storage module)-export ([Method name/number of input parameters])
Copy Code code as follows:
Method1 ({a,b,c})->a*b*c;
MEHTOD2 ({d,e})->d-e.
There are two types of module properties: predefined and
Please refer to this article http://ftp.sunet.se/pub/lang/erlang/workshop/2003/paper/p29-carlsson.pdf
The focus here is how to implement it. First look at the Code:
Root @ Nd-desktop :~ /Test/M # Cat main. erl% File: Main. erl-Module (main ).-Export ([start/0]).Start ()->M1 = Print: New ("Humpty "),M2 = Print: New ("dumpty "),M1: Message ("Hello! "),M2: Message ("Hi! "),OK.Root @ Nd-desktop :~ /Test/M # Cat print. erl% File: print. erl-Module (print,
Reprinted: http://cryolite.iteye.com/blog/1663436
Erlang/OTP organizes a group of modules that complete specific functions, called applications. This is not a good name. It has different meanings from the conventional application. For example, in the development of Jee, the entire application system is called an application; in iOS, an independent game and a small tool are called an application.The Application of
Erlang is mainly used for writing servers. The GUI is not very important, or even not necessary. However, to improve learning interest, you need to write some guis, so I tried wxerlang on XP. 1, download open web page: http://apps.sourceforge.net/mediawiki/wxerlang/index.php? Title = main_page find the link downloads: http://sourceforge.net/project/showfiles.php? Group_id = 151173 download wxerlang: http://sourceforge.net/project/showfiles.php? Group_
[Erlang crisis] (4.4) named pipeline, erlang4.4Original article, reprinted please indicate the source: Server non-amateur research http://blog.csdn.net/erlib author SunfaceE-mail: cto@188.comNamed Pipes Named Pipe (Named Pipes)
A little known way to connect with an Erlang node that requires no explicit distribution is through named pipes. This can be done by starting Er
1. Install Erlang,
Ii. Installation
To the http://www.erlang.org/download.html, I downloaded the R15B03-1 windows binary file (91.3 MB), just install it directly. This step is very important to set the path after installation!
Add the Bin (such as c: \ erl5.9.3.1 \ bin) to the path of the system variable (right-click my computer/properties/advanced/environment variables ).
Iii. Check whether Erlang
There are only two mixed data types within Erlang: list and tuple, neither of which supports named access, so it is not possible to create associative arrays (hash in ruby) in PHP, Ruby, or Python if there is no additional library.In Ruby I can do this:
server_opts = {:p ort + 8080: ip = ' 127.0.0.1 ',: Max_connections = Ten}
This expression is not supported at the grammar level of ErlangTo avoid this limitation, the
Learning a language, when learning those basic grammar, we often ignore its program debugging, when the program is a little more complex, we can not guarantee that the program is completely correct, we will worry about it, then, the program debugging becomes quite important.Once the Erlang environment is set up, it will default to a debug tool---Erlang debugger (the name is Good (^_^)).Simple use of
After learning a language for an hour, I still cannot implement "Hello World !" ThisProgramErlang is just like this. Even if you have been studying for an hour, you may not know how to implement "Hello World !". This articleArticleIs about how to implement "Hello World!" on Windows !" .
First install the Erlang Program (about 70 m) on the machine. This is not detailed here, so you will know it by Google.
After installation, an "
The Erlang system seems to me to have 3 features: 1. Distribution 2. Multi-core support 3.FP. These 3 features are distributed I think Erlang is the most powerful, supported from the first version to the present, relatively very mature, and multi-core support has been added in these years.
Erlang's distribution system achieves 2 points:
1. Location independence of the nodes;
2. Distributed and transparen
I encountered some trouble when installing the configuration, it is hereby recorded as follows: Environmental Database Server Operating System: Windows2003 Database: OracleDatabase10gEnterpriseEditionRelease10.2.0.1.0erlang running server operating system: Redhat5.3erlang: ErlangR14B03 (erts-5.8.4) Note
I encountered some trouble when installing the configuration. Here I will record the following: Environment Database Server Operating System: Windows 2003 Database: Oracle Database 10g Enterprise
Job control mode (JCL), in which jobs can be started, stopped, detached or connected. The current job can communicate with the shell.With JCL, we can remotely access an Erlang node to access controlCommunication between Erlang nodes requires mutual trust, and mutual trust is done with cookies, so we need to get the other cookie to access the other nodes.First we have a running
Reproduced from--no flowering tree: http://blog.csdn.net/mycwq/article/details/16858805The finishing is very complete, so brought over,The Erlang shell is a tool that uses commands and Erlang interaction in command-line mode. The Erlang shell is powerful and can be directly compiled, loaded, executed, debugged, and so on, and can be used by the shell as a termina
Tags: Bubuko org unix virtual username Miss TST Use uploadInstall Erlang and RABBITMQ on Linux under Installation Erlang
Download Erlang installation packageHttp://erlang.org/download/otp_src_20.3.tar.gz
Upload to the server TMP directory and go to the TMP directory for installation.# cd/tmp# mkdir-p/usr/local/er
Generally speaking, there are 2 kinds of methods used in network communication: Text communication and binary communication. The text communication between PHP and Erlang is relatively simple, there is no discussion here, this article mainly discusses the implementation of binary communication between PHP and Erlang. The implementation steps are as follows:
Erlang
Reprint: http://agileprogrammer.blogspot.com/2006/08/erlang-abstract-form-moduleform.html
We will examine the composition of the Erlang Abstract form in detail. The method is simple, refer to the Abstract form section of the ERALNG document and validate it with practical examples.Abstract FormIn the Abstract form document, a function rep is used to represent a mapping from the
In r13a, Erlang has added support for Unicode. The data types covered in this article include: list, binary, modules involved Stdlib/unicode, Stdlib/io, Kernel/file. Binary The binary type attribute increases the UTF-related Type:utf8, UTF16, UTF32, which correspond to UTF8, UTF16,UTF32 encoding respectively. Binary Constructing When binary is built, if UTF correlation type is specified, then the value of the corresponding integer must be at: 0. 16#D7
Erlang Chat Room Program (i) Erlang chat room Program (ii) client exit Erlang Chat Room program (c) Data Interchange Format---JSON Decodeerlang chat room Program (iv) Data Interchange Format---JSON Encodeerlang Chat Room Program (v) Set up client information Erlang Chat room program (vii) Get online users
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.