Operator

Read(327) Label: operator,

Following is a list of RaqReport operators, including their descriptions, left and right operands, return values and examples.

Operator

Description

Left operand

Right operand

Return value

Example

+

Addition

Numeric value

Numeric value

Numeric value

A1+A2 or 2+3

String

String

String

A1+A2 or "2"+"3"

-

Subtraction

Numeric value

Numeric value

Numeric value

A1-A2 or 3-2

None

Numeric value

Numeric value

-A1

*

Multiplication

Numeric value

Numeric value

Numeric value

A1*A2 or 2*3

/

Division

Numeric value

Numeric value

Numeric value

A1/A2 or 2/3

&& or and

AND

Boolean value

Boolean value

Boolean value

A1&&A2 or

A1>A2 && A2>A3 or

A1>A2 and A2>A3

&

Get position

None

Master cell

 

&A1

 

|| or or

OR

Boolean value

Boolean value

Boolean value

A1||A2 or

A1>A2 || A2>A3 or

A1>A2 or A2>A3

! or not

NOT

None

Boolean value

Boolean value

!A1 or

!(A1>A2)

==

Equal to

Numeric value

Numeric value

Boolean value

A1==A2

String

String

A1==A2

Date

Date

datetime (“2006-10-10”)==A3

Boolean value

Boolean value

(A>B) == (B>C)

!=

Not equal to

Numeric value

Numeric value

Boolean value

A1!=A2

String

String

S1!=S2

Date

Date

D1!=D2

Boolean value

Boolean value

B1!=B2

[:]

From to

Cell

Cell

Set of cells

A set of cells in a rectangular area defined by diagonal points A1 and D5; the syntax is used as a parameter in set functions such as sum and max. For example:

sum([A1:D5])

max([A1:D5])

(The expanding mode of a cell containing link operation should be set as Not expand)

in

Contain

Numeric value or array of numeric values

A List set

Boolean value

A1 in list(1,2,3)

Whether A1 is contained in the specified set

Both the left operand and the right operand can be single values or arrays, for instance:

list(1,2,3) in list(1,2,3,4)

ds1.select(id) in list(1,2,3,5)

1 in ds1.select(id)

1 in ds1.group(id) // Here the code can be written as in ds1.select(id) to increase efficiency

List(1,2,3) in 1

1 in 1

String or array of strings

Date or array of dates

Boolean value or array of Boolean values

Numeric value

Numeric value

Boolean value

A1 in A2, which is equivalent to  A1==A2

String

String

Date

Date

Boolean value

Boolean value

Greater to

Numeric value

Numeric value

Boolean value

A1>A2

String

String

 

Date

Date

 

Boolean value

Boolean value

 

>=

Equal to and greater to

Numeric value

Numeric value

Boolean value

A1>=A2

String

String

 

Date

Date

 

Boolean value

Boolean value

 

Less than

Numeric value

Numeric value

Boolean value

A1<A2

String

String

 

Date

Date

 

Boolean value

Boolean value

 

<=

Equal to and less than

Numeric value

Numeric value

Boolean value

A1<=A2

String

String

 

Date

Date

 

Boolean value

Boolean value

 

%

Get remainder

Numeric value

Numeric value

Numeric value

10%3=1  Get remainder after 10 is divided by 3

.

Member of an object

 

 

 

ds1.select(#2)

$

Absolute location

 

 

 

Denote the current cell’s master cell in the level coordinates’ conditional expression

C5[A5:1]{B5==$B5-3}

@

Parameter or variable identifier

 

 

 

@arg1 Denote parameter arg1

{}

Conditional expression

 

 

 

C5[A5:1]{B5==3} The conditional expression in level coordinates

C5[A5:1]{} Represent a set of all target cells within the specified level coordinates

#

Column number

 

 

 

ds1.#3 Represent the 3rd column in data set ds1

=

Assignment operator

 

 

 

We introduce the concept of variable in RaqReport and add assignment operator to assign value to the variable

,

Comma operator

 

 

 

Compute each part by the comma and return result of computing the last part; note that it is different from the comma in a function parameter

C[]

Linear coordinate operator

 

 

Target cell C or set of target cells C

B1[3; 5]  Return target cell B1 whose vertical ordinate is 3 and horizontal coordinate is 5;

C2[1,3; 2,5]{}  Return a set of target cells C2 whose vertical coordinates are between 1 and 3 and horizontal coordinates are between 2 and 5;

A2[+1; -2]  Return target cell A2 whose offset position is +1; -2 relative to the current cell