Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

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
int is used to specify an integer type.

-- or --

Int
int is used to specify an integer type.

share|improve this question
    
I think you would follow the same rule as outlined in the question "How do you capitalize a proper noun such as iPhone." –  KitFox Jan 15 '12 at 1:41
add comment

marked as duplicate by simchona, RegDwigнt Jan 15 '12 at 1:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 10 down vote accepted

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.

share|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. –  rdhs 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
add comment

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