Operators

Top  Previous  Next

In addition to the usual operators such as "=", ">", "and", "or", MScript supports powerful operators such as  include, like in order to minimize the necessity of coding.

Operator

Meaning

Example

Operator Precedence

;

If empty

A;B;'*' (Use A, if it is empty then use B. if B is also empty then use '*')

1

*

Multiply

C * 3

2

/

Division

C / 2

2

+

Addition or concatenation

n:C + 10,  A + 'XYZ'

3

-

Subtraction

n:C - 5

3

=, ==

Equals to

A = 'X'

4

!=

Not equals To

A != 'X'

4

>

Greater than

n:C > 25

4

>=

Greater than or equals to

n:C >= 25

4

<

Less than

n:C < 25

4

<=

Less than or equals to

n:C <= 25

4

include

Internet style search

NAME include 'pc +notebook -desktop'

4

like

Like  (As in SQL LIKE)

NAME like '%AB%'

4

match

Regular expression (RegEx) match

NAME match '[A-Z][a-z]*'

4

wmatch

File filter match (Wild card)

FNAME wmatch '/ect/*/abc*/*.xml'

4

and, &&

And

(A != '') and n:C > 25

5

or, ||

Or

(A = '') or (B = '')

6

?

If true

A > B ? A

7

:

If .. else

A > B ? A : B

7