CScript: Compile Time Scripting

Top  Previous  Next

MoreMotion Application Studio supports a scripting language that can be used in the properties of basic and library elements, that is executed during the project build;  this language is called as CScript. The syntax and the some of the functions of the CScript is similar to MoreMotion AF's MScript language.

CScript helps us to develop general purpose library elements. The content or the configuration of a page can be defined dynamically using the CScript functions.

The CScript functions can be nested in the all properties of the elements. A property may nest one or more functions.

See Examples.

See CT Definitions ve CT Definitions (Before Close) properties

 

 

Operators

Symbols

Functions

Processing order of the functions

Remover Commands

 

Data Types

A CScript expression can contain one or more of the following data types:

Data Types

Examples

Numeric Constant

1.12, 54.2, -12.34

Boolean Constant

true, false

String Constant

'ABC', 'This is a string', 'Alfredo''s Car'

Symbols

name, ../rect.width, s:dbtype

 

Nested Functions

It is possible to use the CScript functions nested within each other.

Example:

  @vof(ucase(sstrb(title,':')))
  @set( _date, 
    fmtdate(  
      incrdate( now(),'DAY',1),
      'yyyy-MM-dd') )

 
Commenting Symbols: '%//'

The functions that take part after the  '%//' characters are ignored

Examples:

  %set(a,'xyz') @// set 'xyz' to a

  %// %set(b,12) the %set function on this line will be ignored.