I am working with Apple\'s ScriptingBridge
framework, and have generated a header file for iTunes that contains several enum
s like this:
The single quotes indicate characters, rather than strings in C. So each of the enums will have a 32 bit value consisting of the character codes for the four characters. Actual value will depend in character encodings, but I am assuming 8 bit characters. Note there is no appended \0.
You can use the enums for normal comparison/assignment purposes. As with any enum the underlying type is integer.
I've used this technique in embedded systems many times to create 4 character 'names' that were human readable in hex dump/debugger contexts.