Case-sensitivity of identifiers: Difference between revisions

Added Crystal implementation
(Changed again the whole code.)
(Added Crystal implementation)
Line 321:
 
These are the style warnings from [[SBCL]]. Other implementations of Common Lisp might give different warnings.
 
=={{header|Crystal}}==
<lang crystal>dog = "Benjamin"
Dog = "Samba"
DOG = "Bernie"
 
puts "The three dogs are named #{dog}, #{Dog} and #{DOG}."</lang>
Note that in Crystal, variables with all-caps identifiers (like <code>DOG</code>) are always constants.
 
{{out}}
<pre>The three dogs are named Benjamin, Samba and Bernie.</pre>
 
=={{header|D}}==
Anonymous user