While perusing through my organization's source repository I came across this little gem:
RawParameterStorage[!ParameterWorkingIdx][ParameterDataOffset] = ...
Is this valid code? (It compiles) What does the exclamation mark here do?
An invert ~
operator might make sense, since it's commonly confused with the not !
operator in boolean expressions. However, it doesn't seem to make logical sense to impose the not !
operator on an array index. Any Thoughts?
"You " + ["are", "are not"][!loggedIn()] + " logged in."
← an example of the same idea in JavaScript. Agreed icky, but not C's fault! – Hirundine