The script language IScript is a subset of the JavaScript (ECMAScript) language. With IScript you basically can:
- Access objects and properties like
doc.fields.myField.value - Set properties
this.value="jp" - Call methods like
doc.back() - Create built in simple objects such as strings and numbers, example
"hello", 3.14 - Create built in complex objects often called JSON objects, example
{1, "2", [3,4]}
One interesting property of IScript is that a method takes at most one argument. This does not limit the language since a complex object that contains several properties can be passed as argument.
Example:Informal definition of syntax
A script consists of e sequence of expressions separated by semicolon.
Example:An expression is either an assignment or a method call. Getting a property is also considered being a method call without any argument.
A few variables exist in the environment that can be used for accessing their properties or calling their methods. Typically this and doc are available and others depending on the context executing in.
Subobjects are accessed with the dot-notation.
Example:Method calls are done with the ()-notation passing zero or one parameter inside the parenthesis.
Example:Notable differences to JSON
Escape characters in a String have no effect. Use double quotes for strings that contain single quotes and vice versa.
The boolean values true and false are not available, use the strings 'true' and 'false'.
No exponent form for decimal numbers is available, i.e. 1.2e3 is NOT a valid number.
Built in types
The next section describes the types that are always available in IScript.

