Does LiveCode use an interpreter or complier?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
uweuan
Posts: 3
Joined: Sun Apr 21, 2013 8:38 pm

Does LiveCode use an interpreter or complier?

Post by uweuan » Mon Dec 16, 2013 10:03 pm

Hey guys,

I'm wondering whether the Livecode environment uses an interpreter or compiler to translate into machine code. I think it uses an interpreter, but I'll show you my code...

global variable1
on mouseUp
configure
thing
end mouseUp

on configure
put 0 into variable1
end configure

on thing
ask "Type a random number between 1 and 9."
put it into variable1
put variable1 / variable2 into field "Field"
end thing
I was deliberately trying to use a non-existent variable so I could check the error message. So, what happened when I ran this code was it asked me to type a random number between one and nine, and then displayed the error message. As a compiler scans the whole code and fails to run if there's any errors, I assume it's an interpreter.

Thanks for your help.

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: Does LiveCode use an interpreter or complier?

Post by SparkOut » Mon Dec 16, 2013 11:05 pm

What makes you assume there is an error for the compiler? You simply haven't given any content to the variable. Try turning on strict variable checking, and you will see the difference.

Post Reply