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


 
MoDuLe CheckIT {
      \\ keys as case sensitive if they are strings
      Inventory A= "Dog":=1, "dog":=2,"DOG":="Hello", 100:="Dog"
      Print A("Dog"), A("dog"), A$("DOG"), A$(100)
 
      \\ Enumeration get type as defined (same case)
      Enum Dogs {Benjamin, Samba, Bernie}
      Print Type$(Bernie)="Dogs"
      Print Type$(DOGS)="Dogs"
      m=BenJamiN
      m++
      Print Eval$(m)="Samba"  ' same case as defined
 
      DoG$="Benjamin"
      DOG$="Samba"
      doG$="Bernie"
      PrinT "There is just one dog named "+Dog$+"."
      goto Dog
dog:
      Print "dog"
      Exit
Dog:   
      Print "Dog"   
      GoTo dog
}
Checkit
 