Doubles and Singles

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Why do the following results occur?

Immediate window:

?7.2 <= 6*1.2
False
?7.2 <= convert.ToSingle(6*1.2)
False
?7.2 <= convert.ToDouble(6*1.2)
False
?7.2 <= 7.2
True

What coding practise should be used to handle this situation correctly?
 
Peter,

Somewhere on 11-10 (or 10-11 depening on your culture setting) you see a
long thread in this newsgroup, involved where David, Jay B. Harlow, Jon
Skeet, csmba, Peter Huang, Alan Lehun and maybe even more, maybe you can
have a look at that, goes in my opinion far about your question.

Cor
 
Cor,
Which is why I say Oct 11th or Nov 10th, to avoid any ambiguity...

Just a thought
Jay
 
Jay,

I was doing that, however I became in doubt, here we say 11 october and I am
in doubt if it is every where in the English speaking world done as in the
US because in Brittain they use 11-10-2004 for October 11th 2004 and not the
US anglo Canadian way.

However I do that next time, you know I have something against that
assynchrose use of the date as done in the US.

That has nothing to do with the US is self. I have as well something agains
the crazy use of numbers in the Dutch and German language, we say
translated to English numbers OneTwenty, TwoTwenty, HundredOneTwenty, real
foolish.

Maybe you knew this however the French beat us in that FourTwentyTenOne
means 91 while the French speaking part of Belgian use NintyOne.

However I have to life with that, next time I use october 11.

Thank you for pointing your attention on that.

Cor
 
Cor,
I don't think it matters if you use 10 October or October 10, my point was I
spell out the month...

By "spell out" I mean I use either the full word October, or its abbrivation
Oct.

Just a thought
Jay
 
Jay,

Clear, however I did not want to do it wrong but I got it again. In Brittain
I thought it was 10th of October. So there was not been a problem when I had
written 10 Oct.

:-))

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top