How to resolve the algorithm Case-sensitivity of identifiers step by step in the Icon and Unicon programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Case-sensitivity of identifiers step by step in the Icon and Unicon 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 Icon and Unicon programming language

Source code in the icon programming language

procedure main()

   dog := "Benjamin"
   Dog := "Samba"
   DOG := "Bernie"
	
   if dog == DOG then 
      write("There is just one dog named ", dog,".") 
   else 
      write("The three dogs are named ", dog, ", ", Dog, " and ", DOG, ".")

end


  

You may also check:How to resolve the algorithm Arrays step by step in the C# programming language
You may also check:How to resolve the algorithm Fast Fourier transform step by step in the OCaml programming language
You may also check:How to resolve the algorithm Quickselect algorithm step by step in the Maple programming language
You may also check:How to resolve the algorithm URL decoding step by step in the Bash programming language
You may also check:How to resolve the algorithm Align columns step by step in the Picat programming language