What does the 'k' prefix indicate in Apple's APIs? [duplicate]
-
21-08-2019 - |
Question
This question already has an answer here:
- Lower case “k” in Cocoa 2 answers
I've run across many examples of Core Foundation variables named k
+ someVariableNameHere
or k
+ APILibraryName(2Char)
+ someVariableNameHere
. What does this prefix K
indicate?
Examples include:
kGLPFAStereo
kCollectionLockBit
kSetDebugOption
Solution
The k means constant in hungarian notation... see Lower case "k" in Cocoa.
OTHER TIPS
This is a naming convention from the early days of macintosh programming. It indicates a constant.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow