This bit of ASP code is being illogical help

Here you can talk about anything that isn't covered by the other categories.
Post Reply
Anakin McFly
Ultimate Poster
Posts: 1490
Joined: Mon Jan 12, 2015 5:40 am

This bit of ASP code is being illogical help

Post by Anakin McFly »

If x = 377168.164513315 then
response.write "yes"
Else response.write "no"
End If

Result = yes

If y > 377168.164513315 then
response.write "yes"
Else response.write "no"
End If

Result = yes

If y > x then
response.write "yes"
Else response.write "no"
End If

Result = no

wtf is this sorcery? [gonemad]
phe_de
Ultra Poster
Posts: 545
Joined: Sat Jan 03, 2015 10:58 am
Location: Germany

Re: This bit of ASP code is being illogical help

Post by phe_de »

My guess: Types.
Maybe x and y are not Interpreted as numbers but as strings.
Or: Rounding problems.

But I don't know ASP. Just a few other languages.
Common sense is another word for prejudice.
Anakin McFly
Ultimate Poster
Posts: 1490
Joined: Mon Jan 12, 2015 5:40 am

Re: This bit of ASP code is being illogical help

Post by Anakin McFly »

Yeah, I just discovered it was a type problem, so I've fixed it!
Pope Bucky
Super Poster
Posts: 193
Joined: Tue Jan 06, 2015 11:56 pm

Re: This bit of ASP code is being illogical help

Post by Pope Bucky »

Why I use Hungarian naming of variables.
User avatar
Gendo
Site Admin
Posts: 3063
Joined: Thu Jan 01, 2015 7:38 pm

Re: This bit of ASP code is being illogical help

Post by Gendo »

phe_de wrote:My guess: Types.
Maybe x and y are not Interpreted as numbers but as strings.
Or: Rounding problems.

But I don't know ASP. Just a few other languages.
Well ASP isn't a language; more of a framework. The language being used is Visual Basic.
User avatar
Ptolemy_Banana
Super Poster
Posts: 359
Joined: Tue Jan 06, 2015 1:03 pm

Re: This bit of ASP code is being illogical help

Post by Ptolemy_Banana »

Gendo wrote:
phe_de wrote:My guess: Types.
Maybe x and y are not Interpreted as numbers but as strings.
Or: Rounding problems.

But I don't know ASP. Just a few other languages.
Well ASP isn't a language; more of a framework. The language being used is Visual Basic.
Someone wedgie Gendo.
Post Reply