From: Roy S. <roy...@ic...> - 2006-06-22 02:43:27
|
So by what definition of "strongly typed" is automatically converting bool to double a good idea? This shouldn't compile! int main(void) { double testing = true; return 0; } Why is this a problem? My bright idea was to make FEMSystem::verify_analytic_jacobians a Real, so if it was zero it would be interpreted as "false", and by setting it nonzero the user could decide what tolerance was large enough to catch bugs yet small enough not to be tripped by floating point error. But writing code to use this feature just a few weeks later... the name "verify_analytic_jacobians" sounds like a bool sort of variable, doesn't it? So I set it to "true", and my code happily verified that the error in my analytic jacobians was no more than 100%. Hooray! --- Roy |