;

Syntax statement1; statement2

Action The semicolon character is UserTalk's statement separator; it demarks the end of statement1, and thus the beginning of statement2.

When you edit a script in Frontier's script editor, the outline structure shows where statements begin and end. Frontier automatically inserts semicolons at the correct places before it compiles the text in the outline, so the only time you should use semicolons in the script editor is when you have two or more statements on the same line.

Examples target.set (@examples); table.getCursor ()
examples.nextchar

Combining multiple statements one line is especially handy in conjunction with the Run Selection command in the UserLand menu. The pair of statements above can be typed into an outline heading, and executed by typing cmd-/ or ctrl-/.

temp = x; x = y; y = temp

Here we swap the values of x and y, but just don't want to devote three lines to the operation.

Notes Since the Quick Script window has no outline structure, if you enter a multiple-statement script there you must include semicolons. Some of the examples you see in the documentation assume that you are using the Quick Script window, and include semicolons. If you type these scripts into separate headings in a script window, the semicolons should be omitted.

See Also "{ }"

Discuss