I'm trying to write some code in ASP to basically say the following:
if x %26lt; -2 then
y=4
end if
However, the statement never makes it through when x really is less than a negative 2. I've tried putting parentheses around the -2, but that doesn't help.
Any ideas?
How do I use a negative number as an argument in an if statement in asp?
try "if x+2 %26lt; 0 then"
if not, make sure you are comparing what you think you are comparing...
"if CLng(x) %26lt; CLng(-2) then"
Reply:You could try x %26lt; (0-2) then...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment