Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Erlang BIFS Processes

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[erlang:processes()]).

Erlang BIFS ports

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~w~n",[erlang:ports()]).

Erlang BIFS now

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[erlang:now()]).

Erlang BIFS memory

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[erlang:memory()]).

Erlang localtime

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[erlang:localtime()]).

Erlang BIFS put

-module(helloworld). 
-export([start/0]). 

start() -> 
   put(1,"One"), 
   put(2,"Two"), 
   io:fwrite("~p~n",[get()]).

Erlang BIFS get

-module(helloworld). 
-export([start/0]). 

start() -> 
   put(1,"One"), 
   put(2,"Two"), 
   io:fwrite("~p~n",[get()]).

Erlang BIFS float

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[float(5)]).

Erlang element

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[element(2, {a, b, c})]).

Erlang byte_size

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[byte_size(<<1,2,3>>)]).

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.