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:

The three dogs are named Benjamin, Samba and Bernie.

For a language that is lettercase insensitive, we get the following output:

There is just one dog named Bernie.



Related task

 Unicode variable names


CL-USER> (let* ((dog "Benjamin") (Dog "Samba") (DOG "Bernie"))
	   (format nil "There is just one dog named ~a." dog))
; in: LAMBDA NIL
;     (LET* ((DOG "Benjamin") (DOG "Samba") (DOG "Bernie"))
;       (FORMAT NIL "There is just one dog named ~a." DOG))
; 
; caught STYLE-WARNING:
;   The variable DOG is defined but never used.
; 
; caught STYLE-WARNING:
;   The variable DOG is defined but never used.
; 
; compilation unit finished
;   caught 2 STYLE-WARNING conditions
"There is just one dog named Bernie."