Hungarian notation

I use Hungarian notation for my variables. I learnt it at my last job. It might not be the original one but it is the kand of interpretation that we used at my department.

A variable name has there parts <prefix><type><qualifier>. Only type is compulsary, prefix and Qualifier are optional.

  1. type: a type is the type of variable. It is not the same as integer or double, it tells the problem oriented meaning of the variable, e.g length, height, volume, file, icon, frame etc. It is written by lower case letters. I have used the type sz for strings = zero terminated string from C language.
  2. prefix: there are a small number of predefined prefixes.
    i = index. E.g. ifile is the index of a file, iframe is the index of a frame, ix is the index of an x-coordinate.
    c = count = the number of items.  cfile is the number of files, cframe is the number of frames, cx is the number of x-coordinates.
    vr= vector.  vrframe = a vector of frames, maybe declared as ArrayList or anything else.
    mx = matrix.
    Examples of usages:
    for (int ifile=0;  ifile < cfile; ifile++)
    System.out.println("File [", ifile, "]  ", vrfile[ifile].getName());
  3. Qualifier: The qualifier is always written by a capital first letter, it is a further specification of the item.
    E.g. fileIn = input file, fileOut = output file, xLeftCorner = the x-coordinate of the left corner, xRightCorner =  the x-coordinate of the right corner.