You are here: Elements > Methods > Notation for Constant/Variable Names

Notation for Constant/Variable Names

We use a form of Hungarian notation for names of input constants and output variables. In the case of i64CurrentField, for example, the "i64" preface tells you that the value is a 64-bit signed integer. Every scalar name starts with a one-, two-, or three-character tag that defines its type (in the C++ sense). These tags are:

bBoolean
bytUnsigned Byte (8-bit)
csString object
iSigned Integer (32-bit)
i64Signed Integer (64-bit)

 

An array name has an initial 'a' for array followed by one of the tags above. Thus abytLayer is an array of bytes. All arrays used are one-dimensional.

We add the following additional tags as appropriate:

Variable Notations
bitBit
bytByte
frmFrame
nNumber of
ofsOffset (may be in bits or bytes)
sizSize (always in bits)

 

Thus aisizbitField is an array of integers that hold sizes (of fields) in bits, inbytTruncated is an integer that holds a count of bytes (that have been truncated), and ifrmofsbitLayerStart is an integer that holds a bit offset (of the start of a layer) within a frame.