syntax error not flagged?

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

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu