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.