Statements

TIScript supports all statements of JavaScript:

 

Pay attention that syntax of named loops is different from JavaScript:

 

include statement

Include statement allows to include (load) other script files into current execution scope:

 
Multiple inclusions of the same file allowed but file will be loaded only once - when it seen first time. As a consequence: circular references will not cause any harm.

assert statement

An assertion is a statement that enables you to test your assumptions in your code.

Assertion statement statrts from keyword “assert” followed by expression to test and optional additional expression to show in stderr output:

  assert <test-expression> [ : <expression>] ;

If <test-expression> will be evaluated to false then runtime will generate an Error with the text:

Assertion failed on [text of the test expression]
or
Assertion failed on [text of the test expression]: [value of second expression]

tiscript/statements.txt · Last modified: 2009/07/07 00:56 by andrew
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0