Page 1 of 1
This bit of ASP code is being illogical help
Posted: Thu Jun 11, 2015 4:15 am
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 [gonemad]](./images/smilies/gonemad.gif)
Re: This bit of ASP code is being illogical help
Posted: Thu Jun 11, 2015 6:22 am
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.
Re: This bit of ASP code is being illogical help
Posted: Thu Jun 11, 2015 7:17 am
by Anakin McFly
Yeah, I just discovered it was a type problem, so I've fixed it!
Re: This bit of ASP code is being illogical help
Posted: Thu Jun 11, 2015 11:50 am
by Pope Bucky
Why I use Hungarian naming of variables.
Re: This bit of ASP code is being illogical help
Posted: Fri Jun 12, 2015 4:59 pm
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.
Re: This bit of ASP code is being illogical help
Posted: Sat Jun 13, 2015 6:22 pm
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.