How to resolve the algorithm Case-sensitivity of identifiers step by step in the Lasso programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Case-sensitivity of identifiers step by step in the Lasso 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 Lasso programming language
Source code in the lasso programming language
local(dog = 'Benjamin')
local(Dog = 'Samba')
local(DOG = 'Bernie')
stdoutnl('There is just one dog named ' + #dog)
local(dogs = map(
'dog' = 'Benjamin',
'Dog' = 'Samba',
'DOG' = 'Bernie'
))
stdoutnl(#dogs -> size)
local(dogs = map(
bytes('dog') = 'Benjamin',
bytes('Dog') = 'Samba',
bytes('DOG') = 'Bernie'
))
stdoutnl(#dogs -> size)
stdoutnl(#dogs -> find(bytes('Dog')))
You may also check:How to resolve the algorithm Find duplicate files step by step in the Ruby programming language
You may also check:How to resolve the algorithm Caesar cipher step by step in the V (Vlang) programming language
You may also check:How to resolve the algorithm Largest int from concatenated ints step by step in the Groovy programming language
You may also check:How to resolve the algorithm Draw a pixel step by step in the Tcl programming language
You may also check:How to resolve the algorithm N-queens problem step by step in the PL/I programming language