View Single Post
  #5 (permalink)  
Old 10-30-2005, 03:45 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow Exponential notation & Hungarian notation.

Quote:
Originally Posted by newdigital
An other question.
double should be between 2.2e-308 to 1.8e308.
What is e?
Is it in hexadecimal format?

And an other question.
I know that somebody uses the letters before name of variables, for example:
int nSomeNumber = 12345;
bool bIsRightPlace = true;
double fCurrentPrice = 1.2344;
datetime tCurrentDate = D'2005.02.02. 8;00';
color cChartColor = Olive;
string sMyName = "Joel"


I mean n for int, b for bool, f for double, t for datatime, c for color and s for string. Is it still usable?
Thank you newdigital for your intelligent questions.

Question 1:

2.2e-308 and1.8e308 are numbers wrote in exponential notation.
Exponential notation is a way of writing large numbers without having to write out a lot of zeros, for example, 1,000,000,000 can be written as 1.0E9.
The number followed the E is called the exponent and it indicates how many places the decimal point must be moved to change the number to the normal decimal notation.
The exponent can be positive or negative; the exponential number 6.35E-5 is equivalent to 0.0000635 in decimal notation.

Question 2:

Yes, this is very a good programming practice, and it called Hungarian notation.
Hungarian notation is a naming convention in programming, in which the name of a variable (or function) indicates its type or intended use.

You prefixed every variable name with the first letter of the variable type, and that's what Hungarian notation mean.
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm

Last edited by newdigital; 10-30-2005 at 04:10 PM.
Reply With Quote