Operators

Assignment

Equals (=)

Simple assignment operator, Assigns values from item2 (the right side) to item1 (the left side).

 

{ }
[{"data":{"type":"variable","step":"x = 10","var":"x","val":10,"maxpaths":1,"uuid":"d7db099a1a3f9e2df693cd4422bb26cb","x":300,"y":320,"width":120,"height":32},"paths":["2972ab09b5a4051dd5d340e725fb6ccc"]},{"data":{"type":"variable","step":"y = 20","var":"y","val":20,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x = y","call":"operators.assignment.=","args":{"item1":"{\"~\":\"x\"}","item2":"{\"~\":\"y\"}"},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.=":"="},"paths":[]}]

Example Response

{"x":20,"y":20}

Add Equals - string (+=)

Add AND assignment operator, It adds right operand to the left operand and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 'a'","var":"x","val":"a","maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x += 'b'","call":"operators.assignment.+=","args":{"item1":"{\"~\":\"x\"}","item2":"b"},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.+=":"+="},"paths":[]}]

Example Response

{"x":"ab"}

Add Equals - number (+=)

Add AND assignment operator, It adds right operand to the left operand and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 10","var":"x","val":10,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x += 20","call":"operators.assignment.+=","args":{"item1":"{\"~\":\"x\"}","item2":20},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.+=":"+="},"paths":[]}]

Example Response

{"x":30}

Subtract Equals (-=)

Subtract AND assignment operator, It subtracts right operand from the left operand and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 10","var":"x","val":10,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x -= 20","call":"operators.assignment.-=","args":{"item1":"{\"~\":\"x\"}","item2":20},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.-=":"-="},"paths":[]}]

Example Response

{"x":-10}

Multiply Equals (*=)

Multiply AND assignment operator, It multiplies right operand with the left operand and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 5","var":"x","val":5,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x *= 3","call":"operators.assignment.*=","args":{"item1":"{\"~\":\"x\"}","item2":3},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.*=":"*="},"paths":[]}]

Example Response

{"result":15}

Divide Equals (/=)

Divide AND assignment operator, It divides left operand with the right operand and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 20","var":"x","val":20,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x \/= 4","call":"operators.assignment.\/=","args":{"item1":"{\"~\":\"x\"}","item2":4},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.\/=":"\/="},"paths":[]}]

Example Response

{"result":5}

Modulo Equals (%=)

Modulus AND assignment operator, It takes modulus using two operands and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 5","var":"x","val":5,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x %= 3","call":"operators.assignment.%=","args":{"item1":"{\"~\":\"x\"}","item2":3},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.%=":"%="},"paths":[]}]

Example Response

{"result":2}

Divide Floor Equals (//=)

Floor Division and assigns a value, Performs floor division on operators and assign value to the left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 5","var":"x","val":5,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x \/\/= 3","call":"operators.assignment.\/\/=","args":{"item1":"{\"~\":\"x\"}","item2":3},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.\/\/=":"\/\/="},"paths":[]}]

Example Response

{"result":1}

Power Equals (**=)

Exponent AND assignment operator, Performs exponential (power) calculation on operators and assign value to the left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 5","var":"x","val":5,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x **= 3","call":"operators.assignment.**=","args":{"item1":"{\"~\":\"x\"}","item2":3},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.**=":"**="},"paths":[]}]

Example Response

{"result":125}

Binary Left Shift Equals (<<=)

Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 60","var":"x","val":60,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x <<= 2","call":"operators.assignment.<<=","args":{"item1":"{\"~\":\"x\"}","item2":2},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.<<=":"<<="},"paths":[]}]

Example Response

{"result":240}

Binary Right Shift Equals (>>=)

Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 60","var":"x","val":60,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x >>= 2","call":"operators.assignment.>>=","args":{"item1":"{\"~\":\"x\"}","item2":2},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.>>=":">>="},"paths":[]}]

Example Response

{"result":15}

Binary AND Equals (&=)

Binary AND Operator copies a bit to the result if it exists in both operands and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 60","var":"x","val":60,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x &= 13","call":"operators.assignment.&=","args":{"item1":"{\"~\":\"x\"}","item2":13},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.&=":"&="},"paths":[]}]

Example Response

{"result":12}

Binary OR Equals (|=)

Binary OR Operator copies a bit if it exists in either operand and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 60","var":"x","val":60,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x |= 13","call":"operators.assignment.|=","args":{"item1":"{\"~\":\"x\"}","item2":13},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.|=":"|="},"paths":[]}]

Example Response

{"result":61}

Binary XOR Equals (^=)

Binary XOR Operator copies the bit if it is set in one operand but not both and assign the result to left operand.

 

{ }
[{"data":{"type":"variable","step":"var x = 60","var":"x","val":60,"maxpaths":1,"uuid":"2972ab09b5a4051dd5d340e725fb6ccc","x":300,"y":400,"width":120,"height":32},"paths":["9148d39266042bc89aff74e46b1a483b"]},{"data":{"type":"library","step":"set x ^= 13","call":"operators.assignment.^=","args":{"item1":"{\"~\":\"x\"}","item2":13},"maxpaths":1,"uuid":"9148d39266042bc89aff74e46b1a483b","x":300,"y":480,"width":120,"height":32,"operators":"operators","operators.assignment.^=":"^="},"paths":[]}]

Example Response

{"result":49}