"Camellia" <br*********@gmail.comwrites:
Just a humble question, I tried to assign a real number with exponents
to a variable but obviously I can't do:
double a = 1e-10;
The compiler will in turn complain about the undefined 'e'.
The declaration
double a = 1e-10;
is perfectly legal. It's possible, but very unlikely, that your
compiler has a bug that causes it to reject this legal code. It's far
more likely that the code you posted is not the code your compiler
complained about, and that you accidentally fixed the error when you
re-typed the code for posting.
For example, if your real code were:
double a = e-10;
the compiler would complain that "e" is undeclared (unless you happen
to have declared something called "e").
If you're having trouble with your code, you need to post the *exact*
code. Don't re-type it; copy-and-paste it.
A minor point: If you want to post about this again, please use a name
other than "a". Since "a" is also an English word, it makes it
difficult to write about it. "x" would be fine.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.