Mike
Mike

Reputation: 19717

Is there a standard terse name for "number of"?

I've found that in programs, I inevitably have a couple of variables that are named along the lines of numberOfBooks, or numberOfPeople. Is there a commonly used word that makes sense that's a bit shorter than numberOf?

Upvotes: 0

Views: 510

Answers (3)

Sriram
Sriram

Reputation: 838

How about bookCount and peopleCount?

Upvotes: 2

paxdiablo
paxdiablo

Reputation: 881643

Count or quantity are the usual suspects so you could get away with things like:

bookCount
bookQty
bookQuant

and so forth. But you don't have to use full words, as shown in the Qty abbreviation above.

If you wanted to stay close to what the other programs are using, just use something like:

numBooks
numPeople

Upvotes: 3

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798754

I usually use "qty", short for "quantity".

Upvotes: 1

Related Questions