"if var!=-1 then" and "if not var=-1 then"

new topic     » topic index » view thread      » older message » newer message

It there a differance between
if var!=-1 then
and
if not var=-1 then?

On a program I was working on here is what happened:

?st--displayed 5
if not st=-1 then
puts(1,"Hello!")--didn't run
--bunch of other stuff was here, didn't run
end if

Then I tried this to see what would happen:

st=-1
?st--displayed 5
if not st=-1 then
puts(1,"Hello!")--still didn't run
--bunch of other stuff was here,still didn't run
end if

Then I tried this:

?st--displayed 5
if st!=-1 then
puts(1,"Hello!")--Displayed "Hello!"
--bunch of other stuff was here, ran fine
end if

What is happening?!?!?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu