| Home | Join | Contact Us | Privacy Policy | Login | Logout |
|
|||
Naming Conventions (Hungarian)Below is a free term papers summary of the paper "Naming Conventions (Hungarian)." If you sign up, you can be reading the rest of this term papers in under two minutes. Registered users should login to view this term paper.
Doug Klunder January 18, 1988 1. Introduction This document describes a set of naming conventions used by the Applications Development group. These conventions commonly go by the name "Hungarian", referring both to the nationality of their original developer, Charles Simonyi, and also to the fact that to an uninitiated programmer they are somewhat confusing. Once you have gained familiarity with Hungarian, however, we believe that you will find that the clarity of code is enhanced. For convenience, this memo first describes how to use Hungarian, and then describes why it is useful; the general approach is from a programming viewpoint, rather than a mathematical one. For a more theoretical approach, you are invited to read Chapter 2 of Simonyi's "Meta-Programming" thesis. 2. The Rules Hungarian is largely language independent; it is equally applicable to a microprocessor assembly language and to a fourth-generation database application language (and has been used in both). However, there is a little flavor of C, in that arrays and pointers to arrays are not clearly distinguished. While this may sound confusing, in practice there is little ambiguity. 2.1. Variables The most common type of identifier is a variable name. All variable names are composed of three elements: prefixes, base type, and qualifier. (These are also referred to as constructors, tag, and qualifier). Not all elements are present in all variable names; the only part that is always present is the base type. This type should not be confused with the types supported directly by the programming language; most types are application specific. For example, an lbl type could refer to a structure containing symbol information; a co could be a value specifying a color. 2.1.1. Base types (tags) As the above examples indicate, tags should be short (typically two or three letters) and somewhat mnemonic. Because of the brevity, the mnemonic value will be useful only as a reminder to someone who knows the application, and has been told what the basic types are; the name will not be sufficient to inform (by itself) a casual viewer what is being referred to. For example, a co could just as easily refer to a geometric coordinate, or to a commanding officer. Within the context of a given application, however, a co would always have a specific meaning; all co's would refer to the same type of object, and all references to such an object would use the term co. One should resist t... This is not the end of the termpaper! Register below to see the complete version of this term paper.
| ||||||||||||||||||||||||
| Home | Login | Logout | Join | Privacy Policy | Contact Us |
|
Copyright © 2002-2007 Mid Term Papers. All rights reserved. This term papers website is used for research purposes only. If you have forgotten your username or password, please click here. If you like to cancel your account, please click here. |
|
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 |