49

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

woz
  • 10,888
  • 3
  • 34
  • 64
locriani
  • 4,995
  • 2
  • 23
  • 26

2 Answers2

47

The k means constant in hungarian notation... see Lower case "k" in Cocoa.

Community
  • 1
  • 1
Jarret Hardie
  • 95,172
  • 10
  • 132
  • 126
1

This is a naming convention from the early days of macintosh programming. It indicates a constant.

1800 INFORMATION
  • 131,367
  • 29
  • 160
  • 239