I've never used the DEMO version of PicBasic Pro. So, I can't really say for sure, but, It doesn't seem like it would be much of a DEMO if it couldn't even do IF-ELSE-ENDIF's.

Maybe there was a problem there too.

This should work.
Code:
IF S4=0 then 
    t =500
ELSE
    t =5000
ENDIF
This will Not.
Code:
IF S4=0 then t =500 : ELSE t = 5000 : ENDIF