How to resolve the algorithm Case-sensitivity of identifiers step by step in the Oberon-2 programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Case-sensitivity of identifiers step by step in the Oberon-2 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 Oberon-2 programming language
Source code in the oberon-2 programming language
MODULE CaseSensitivity;
IMPORT
Out;
VAR
dog, Dog, DOG: STRING;
BEGIN
dog := "Benjamin";
Dog := "Samba";
DOG := "Bernie";
Out.Object("The three dogs are named " + dog + ", " + Dog + " and " + DOG);
Out.Ln
END CaseSensitivity.
You may also check:How to resolve the algorithm Sorting algorithms/Quicksort step by step in the NetRexx programming language
You may also check:How to resolve the algorithm Generate Chess960 starting position step by step in the Lua programming language
You may also check:How to resolve the algorithm Logical operations step by step in the hexiscript programming language
You may also check:How to resolve the algorithm Day of the week step by step in the Perl programming language
You may also check:How to resolve the algorithm Gaussian elimination step by step in the Modula-3 programming language