syntax error not flagged?
- Posted by Jim <futures8 at EARTHLINK.NET> Oct 01, 2000
- 418 views
Maybe someone can explain the following, which contains a syntax error ... if compare(a,b) then... , (should have been equal(a,b) or compare(a,b) = 0) which is not flagged by the interpreter as an error, and then results in the code producing the wrong 'result'. with trace sequence a,b,c,result a = "UP" b = "DOWN" c = "UP" trace(1) if compare(a,c) then result = "right" elsif compare(a,b) then result = "wrong" end if puts(1,result&"\n") Thanks, Jim