logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
DanielV  
#1 Posted : Saturday, July 4, 2009 8:57:56 PM(UTC)
DanielV

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/15/2006(UTC)
Posts: 2

Is it possible to remove it? I find it very distracting specially for a newcomer. Thanks in advance, Daniel
wabbit  
#2 Posted : Saturday, July 4, 2009 9:21:35 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Hi Daniel,

Welcome to the forum.

Once you have the MDK you can do almost anything! If you want to wade through the headers etc and change each instance to a non-Hungarian notation format then you can. Personally, I wouldn't and I would strongly recommend that you get used to the concept, practice it and use it in all of your coding.

The beauty of this style of naming convention is that "everyone" uses it, and, it will help you identify each data-type just from the variable name

e.g. a_fData
a_: an argument passed into the function as opposed to l_ which is the locally declared variable
f: of a float data type

e.g l_iMaxRecords
l_: a locally declared variable
i: of the integer data type

So why is this important? What happens when you multiply a float by an integer? Using Hungarian notation reminds the programmer of each data type as they write the code, so when they write something like:

X * Y

could get unreliable results if they are different datatypes, whereas:

l_iX * a_lfY

should spark some immediate attention to the fact X and Y aren't the same data types.

Using l_ and a_ also allow the programmer to use the same variable descriptor for, say, Profit where l_lfProfit is the profit target for this trade and a_lfProfit is the static variable for all trades e.g. if(l_fProfit >= a_lfProfit) {//whatever}


Just like when learning any other language, proficiency and fluency takes time and a little practice.


Hope this helps.

wabbit [:D]

DanielV  
#3 Posted : Saturday, July 4, 2009 11:10:53 PM(UTC)
DanielV

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/15/2006(UTC)
Posts: 2

Helps and a lot! Thanks for the explanation and the tip! Daniel
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.