Operators in SRON

For full documentation visit here.


SRON provides a number of operators which help developers work easily with data.

1. Mathematical operators:

These operators are used to perform mathematical operations like:

Operators
Usage

+

Addition

-

Subtraction

*

Multiplication

/

Division

%

Modulus

^

Exponent (to the power)

2. Logical operators:

These operators are used to perform logical operations like and, or, and not.

Operators
Usage

&&

and

||

or

!

not

3. Comparison operators:

These operators are used to perform comparisons between two types of values.

Operators
Usage

==

equality

===

strict equality

!=

not equals

<=

less than or equals to

>=

more than or equals to

<

less than

>

more than

4. Assignment operators:

This operator is used to assign values to a variable.

Operators
Usage

=

assign

+=

add and assign

-=

minus and assign

*=

multiply and assign

/=

divide and assign

%=

mod and assign

^=

Power and assign

5. Miscellaneous operators:

These operators are used for different purposes.

Operators
Usage

~{

Math block start

~}

Math block end

{

Scope start

}

Scope End

:

Attribute-Statement separator

(

Open-bracket

)

Close-bracket

[

List start

]

List close

,

Value separator

"

String start/end

'

Char start/end

6. Bitwise operators:

These operators are used to perform bitwise operations

Operators
Usage

xor

xor operation

lsft

left-shift bitwise operation

rsft

right-shift bitwise operation

and

bitwise and operation

or

bitwise or operation

not

bitwise not operation

Last updated