C Naming

C Naming - Prefix Type Usage Example b BYTE Signed 8-bit...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Prefix Type Usage Example b BYTE Signed 8-bit value bValue c char Signed 8-bit value (usually an ASCII character) cValue l long Signed 32-bit value lValue n int Signed 16-bit value nSize p U16 : pointer Generic prefix for a pointer to the next type pnFoo w U16 : WORD Unsigned 16-bit value wCnt dw U32 : DWORD Unsigned 32-bit value dwValue f boolean Boolean TRUE or FALSE bBusy fn function Prefix to function name fnGetString fp float, double Floating point fpPrice t structure User-defined C structure. pt points to structure instance. ptRECORD g global Global variable gCnt u U8 : unsigned char Unsigned 8-bit value uCnt a through f - floating point values g and h - haven't used those much i through k - indices l - looks too much like "1" m and n - counts o - looks too much like "0" p through s - pointers t - temporary of appropriate type u through z - integer or float as needed (usually in graphics code) There are a few single letter variable names with well understood meanings across a wide variety of...
View Full Document

This document was uploaded on 02/08/2012.

Ask a homework question - tutors are online