The LiveCode language is very similar to English, for example for setting a variable "myVar" to 2 you write:
put 2 into myVar
Ok, it's very lengthy; but it works very well and easy to understand.
Setting an object property require another word set:
set the location of graphic myDraw to 20,30
Operation function priority is used as it is in regular human math, so this is correct:
2 + 3 * 5 * cos(3.14) - 1/3
Loops or function declaration don't use parenthesis but newline char and end word, see this example:
repeat 5 times answer "test" end repeat
attention the next example doesn't work since there aren't newlines:
repeat 5 times answer "test" end repeat
An if / then statement can be placed on one line, for instance:
if myVar = 2 then put myVar into field "txtVar" // no end if is required for this
if / then statements do require more than one line when there is more than one action performed:
if myVar > 2 then put myVar into field "txtGreaterVar" put empty into field "txtLessVar" end if
Comments are made with the "#" char, lines starting with # are ignored, you may also use the following characters at the beginning of a commented line:
-- this is a comment
// also a comment
# also a comment
or /* to bracket a block of comments
that span multiple lines */
# Hello, I'm a comment -- another comment /* a block of comment h ;jh 'ijh poh */