What does the 'k' prefix indicate in Apple's APIs? [duplicate]
Asked Answered
A

2

50

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

Arthropod answered 24/3, 2009 at 1:5 Comment(1)
+1 Thanks for the question. I was wondering about this myself just yesterday.Tenor
M
47

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

Must answered 24/3, 2009 at 1:12 Comment(0)
D
1

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

Dalenedalenna answered 24/3, 2009 at 1:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.