Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-16-2007, 05:15 PM   PM User | #1
chris_angell
Regular Coder

 
Join Date: Jul 2002
Location: Brighton, UK
Posts: 282
Thanks: 1
Thanked 0 Times in 0 Posts
chris_angell is an unknown quantity at this point
adding decimals and formatnumber together

I have set a Dim that is:

dim A = 0.5
dim B = 0.5 but B i am using formatcurrency(dim B)

when i try to compare the two it doesn't let me.. but when i compare a whole number i.e 1 2 3 4 5 my code works fine ?? but ones with 0.5 or 1.5 don't work !!

any ideas why.. i have clng dim A and still nothing

this is what i am doing

if A = B then
end if


cheers
__________________
<marquee>thanks</marquee>
chris_angell is offline   Reply With Quote
Old 03-16-2007, 06:13 PM   PM User | #2
miranda
Senior Coder

 
Join Date: Dec 2002
Location: Arlington, Texas USA
Posts: 1,062
Thanks: 4
Thanked 8 Times in 8 Posts
miranda is an unknown quantity at this point
Have you tried to convert both values to a double?

If CDbl(A) = CDbl(B)
miranda is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:50 PM.


Advertisement
Log in to turn off these ads.