The macro \quail here just includes the picture from the file "G43.pdf", which is a hieroglyph of quail chick. Now, I also have the macro \owl, and \vulture and \frog, and it's getting a bit difficult to keep track of all of them, and the macro namespace is getting polluted.
I'll like to (but I don't know how to) define a macro (let's name it \hg for hieroglyph) that accepts an argument, so that for each of the possible values of the argument, a different set of commands is substituted.
So, in essence, I'm looking for some sort of a switch-case statement, to specify different commands for each possible argument value, which can be a letter, or a number, or a string... And if an undefined argument is passed (like \hg{wrong}), an error is thrown during compilation.
Note that I haven't turned a wrong input into an error as such, just a message, so I opted for making \ifcaseclosed available after the switch environment finished---hence the \global before the \caseclosed{true|false} statements.