Skip to reading
PCA Script Programming

Language quick reference

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Earlier edition reference / Current 0.86.4.0 property paths > p. 329

Source table from Language quick reference, page 306
ConstructForm / rule
Language headerlanguage 1.0
Comments# comment or // comment
TextSingle or double quotes; backslash escapes; one source line.
Declarationslet name: type = value, global name = value, const NAME = value
Assignmentset name to value, =, +=, -=, *=, /=
Decisionif test, else if test, else, end
Loopsrepeat n times, while test, for each value, index in array; close with end.
Loop controlbreak, continue
Functionfunction name(a: type, b = default): type … end
Returnreturn value or bare return
Data recordrecord Name with field:type lines, then end.
Timingwait n seconds, wait until condition, every n seconds … end.
Concurrencyparallel immediate branch instructions … end.
Recoverytry … catch problem … end
Eventwhen ... … end
Debugginglog value, warn value, assert condition, breakpoint
Cross-scriptcall_script(id, function, [arguments], context); readable call script / run visual script forms.

Optional type names: number, integer, text, boolean, array, dictionary, vector2, vector3, color, record and null, plus a declared data-record type. There are no typed generic array declarations such as Array[String] in PCA source.

Page 306 of 357Permalink
Go to page