larger then amount?

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
7 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

larger then amount?
Dummy1912
Hello,

seems i got stuck
how do i do this part
Code: Select all
'THESE ARE JUST EXAMPLE's HOW I GET IT IN REAL CODE
dim a1 as double = -150
dim a2 as double = 100

if a2 > a1 then
msgbox("a2 can't be larger then a1")
else
msgbox("ok")
end if

it seems when i calculated it i get a message thats says that a2 is larger then a1
and like you see its not

any idea how i can calculated it so i don't get this message
i think he can't calculate it because it contains a -

any one?

Image
Image
thanks
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: larger then amount?
clanc789
Why do you declare them as double? Think you have to declare them as integer?
Practice makes perfect!

VIP since: 6-10-2011
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: larger then amount?
Dummy1912
hi clanc789
yea but its not a integer these are amounts :)
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: larger then amount?
clanc789
Lemme think some time on it. I hope I can help you :D
Practice makes perfect!

VIP since: 6-10-2011
User avatar
visualtech
VIP - Donator
VIP - Donator
Posts: 265
Joined: Sat Nov 19, 2011 2:19 pm

Re: larger then amount?
visualtech
use a float it use a string and then use Int32.Parse to change it to an integer
Image
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: larger then amount?
Filip
Try declaring doubles like this:
Code: Select all
dim a1 as double = 5.125
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: larger then amount?
Dummy1912
this will set the amount to 0
Code: Select all
If (amount1 + amount2) > 0 Then
problem solved :)
thanks guys. loove;
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
7 posts Page 1 of 1
Return to “Coding Help & Support”