but 2nd issue, control stat goes through if stat and sees it is false, then goes to else if right, so why the compiler complains about else without if??
If you have more than one line of statements between "if and else if" you need to use the curly brackets to avoid such errors of "else without if"
But take care that your Sop Statement is before the break statement. otherwise the statement becomes unreachable.
hope this clears your 2nd issue.
-zarina