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,805
  • 3
  • 33
  • 64
locriani
  • 4,955
  • 2
  • 22
  • 26

2 Answers2

47

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

Community
  • 1
  • 1
Jarret Hardie
  • 90,470
  • 10
  • 128
  • 124
1

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

1800 INFORMATION
  • 125,607
  • 29
  • 156
  • 237