How to resolve the algorithm Case-sensitivity of identifiers step by step in the Erlang programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Case-sensitivity of identifiers step by step in the Erlang programming language

Table of Contents

Problem Statement

Three dogs (Are there three dogs or one dog?) is a code snippet used to illustrate the lettercase sensitivity of the programming language. For a case-sensitive language, the identifiers dog, Dog and DOG are all different and we should get the output: For a language that is lettercase insensitive, we get the following output:

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Case-sensitivity of identifiers step by step in the Erlang programming language

Source code in the erlang programming language

-module( case_sensitivity_of_identifiers ).

-export( [task/0] ).

task() ->
	catch dog = "Benjamin", % Function will crash without catch
	Dog = "Samba",
	DOG = "Bernie",
	io:fwrite( "The three dogs are named ~s, ~s and ~s~n", [dog, Dog, DOG] ).


  

You may also check:How to resolve the algorithm Two bullet roulette step by step in the EasyLang programming language
You may also check:How to resolve the algorithm Array concatenation step by step in the NetRexx programming language
You may also check:How to resolve the algorithm Bernoulli numbers step by step in the Maple programming language
You may also check:How to resolve the algorithm String length step by step in the Slate programming language
You may also check:How to resolve the algorithm Record sound step by step in the C programming language