Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

. Hungarian notation

The Hungarian notation is made up of a group of conventions used to choose
variable names. The use of conventions for names is especially
useful in the management of large projects where many developers need to
communicate among themselves, and in the maintenance of already
completed projects in which the names assigned to the variables allow the
functioning of the program to be better understood.

The Hungarian notation is the most famous and most used of these conventions.
We suggest, therefore, to use the Hungarian notation to describe the files,
fields and Clipper variables defined when using dBsee.

The Hungarian notation has been created by the Hungarian named Charles
Simonyi, and is independent from any programming language used. In this
appendix, the aspects of the notation that are useful in programming
applications using CA-Clipper and dBsee will be highlighted.

A name expressed in Hungarian notation is made up of three parts: the first
part (optional) indicates the type of element, the second (mandatory)
identifies the main functionalities and the third (optional) identifies the
particular functionalities.

The first part is written in small letters while the second and the third must
begin with a capital letter (ex. nArtCod). The length of each of the three
parts is open, but in the case that all three parts appear, we suggest you use
1 character for the first part, 3 for the second part and 3 for the third
part.

Depending on the typology of the element to describe, it is convenient to
differ the conventions used:

. File names

In this case, the first part is not used. The second part is used to identify
a group of files that describe the same portion of reality. The third part is
used to indicate the details of each single file. For example, two files
OrdHea and OrdRow are both used to describe the information
relative to the order (from which the root Ord is taken). The first
file, in particular, describes the header of the orders (from the Hea
suffix), while the second describes the rows (from the Row suffix).

. Field names

The first part indicates the type of field
(n=Numerical, c=Character, m=Memo, d=Date,
l=Logical). The second and third parts are used, respectively, to group
the fields with the similar characteristics and to identify the details of
each field within its group. For example, the fields nQtyMin and
nQtyMax can be used to indicate two numerical values that fix the
minimum and maximum values for a given quantity.

In practice, though, the first part is often ignored for
field names.

. Variable names

The first part indicates the type of variable. In addition to the
values used for fields, the following can be used: a=array,
b=codeblock, o=object, h=file handle and v=non
standard variable. The second and third parts are similar to those used for
the fields. For example, aNumArr, dCurrDate.

. Function Names

If functions are used, the return type of the variable is
omitted. The second and third parts are used, just as for the names of fields
and variables, to indicate the typology and details of the function. In
particular, functions that manipulate the same type of information must have
the same second part. For example, CodAdd(), CodMod(), CodDel().
For function names, it is not compulsory to use a 3-letter part.
It is also possible to use longer names, that allow to indicate the
functionality. For instance, the dfNum2Word() library
function, indicates a data function Number To
Word, a function that operates on data converting numbers to words (1
'One')


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson