Case-sensitivity of identifiers: Difference between revisions

Added AppleScript.
(→‎{{header|PHP}}: addedoutput to PHP example)
(Added AppleScript.)
Line 143:
'The three dogs are named ',DOG,', ',Dog,', and ',dog
The three dogs are named Benjamin, Samba, and Bernie</syntaxhighlight>
 
=={{header|AppleScript}}==
AppleScript labels are case insensitive, every instance of a particular label within a script document compiling to the same case as the first instance. It's possible to use vertical bars — normally used to distinguish labels from identical language or library keywords — to give the same label different cases within a script, but there's little point in doing so as it's still the same label.
 
<syntaxhighlight lang="applescript">set {dog, |Dog|, |DOG|} to {"Benjamin", "Samba", "Bernie"}
 
if (dog = |Dog|) then
if (dog = |DOG|) then return "There is just one dog named " & dog & "."
return "There are two dogs named " & dog & " and " & |DOG| & "."
else if (dog = |DOG|) then
return "There are two dogs named " & dog & " and " & |Dog| & "."
end if
return "The three dogs are named " & dog & ", " & |Dog| & ", and " & |DOG| & "."</syntaxhighlight>
 
{{output}}
<syntaxhighlight lang="applescript">"There is just one dog named Bernie."</syntaxhighlight>
 
=={{header|Arturo}}==
 
557

edits