English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Erlang Binary is_binary Method

Binary Files in Erlang

This method is used to check whether the bitstring is indeed a binary value.

Syntax

is_binary(bitstring)

Parameter

  • bitstring −This is a bitstring, which needs to be checked whether it is binary.

Return Value

If the bitstring is a binary value, it returns true; otherwise, it returns false.

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

Output Result

When we run the above program, we will get the following results.

true

Binary Files in Erlang