Possible Duplicate:
Capitalising a sentence whose first word is explicitly lowercase
Should I change the structure of a sentence/add filler words to make sure that the sentence always starts with a capital letter?

In programming language documentation, it is common for keywords to appear in titles. Assuming that the keyword is strictly lowercase in the language, how should that keyword be capitalized if it is used as the first word in a title?

For example:

int is used to specify an integer type.

-- or --

int is used to specify an integer type.


It should not be capitalized. If you're trying to make your documentation useful, don't introduce unnecessary complexities.

Use the lowercase int (in fact, use it in a different font, preferably monospaced) for the titles. And comment on the fact that it's lowercase, the first few times you use it, and explain why you're using it.

If you're writing about Unix or any dialect of C, your readers may often need orientation to the types of text conventions involved in programming, in contrast to the types involved in more ordinary writing.

| improve this answer | |
  • +1. Dive into Python uses lower-cased keywords in a medium fixed-width font, even though its headings are in all-caps with a black proportional font. It clashes a bit, sure – but it doesn't draw the stares that an upper-cased int would. – Chel Jan 14 '12 at 23:34
  • 2
    Many years ago I had to take over a software project full of references to int where the original programmer took it for granted that every such variable occupied two bytes of storage (it was many years!). I did a quick global search and replace changing them all to Int, which I #define'd as short. Gradually over the next couple of years maintenance I'd spend the odd few spare minutes checking some instances of Int in detail and deciding whether they should be int or short. I rather like that C++ is case-sensitive! – FumbleFingers Jan 15 '12 at 0:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.