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 Binaries binary_to_list

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

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

Erlang Binaries binary_to_integer

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

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

Erlang Binaries binary_to_float

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

start() -> 
   io:fwrite("~p~n",[binary_to_float(<<"2.2">>)]).

Erlang Binaries binary_part

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

start() -> 
   io:fwrite("~p~n",[binary_part(<<1,2,3,4,5>>,{0,2})]).

Erlang Binaries is_binary

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

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

Erlang Binaries term_to_binary

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

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

Erlang Binaries split_binary

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

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

Erlang Binaries list_to_binary

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

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

Erlang Binaries

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

start() -> 
   io:fwrite("~p~n",[<<5,10,20>>]), 
   io:fwrite("~p~n",[<<"hello">>]).

Erlang BIFS universaltime

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

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

Previous 1 ... 6 7 8 9 10 11 12 ... 23 Next
Advertisements
Loading...

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