-
Notifications
You must be signed in to change notification settings - Fork 2
Operations
PokeJofeJr4th edited this page Aug 14, 2023
·
7 revisions
Operations consist of three parts: the left side, operation, and right side. The left side and operation are limited, but the right side can be any syntax element.
The left side has four possible states:
- Identifier --
x
- Identifier with Colon --
x:score
- Selector --
@s
- Selector with Colon --
@s:score
- Selector with Double Colon --
@s::level
Most applications of operations only permit the identifier case. The main application for the other cases is variables.
The following list contains the characters used to invoke operations and the cases in which they are used.
-
:
-- key-value pair -
:=
-- store result -
::
-- experience -
?=
-- store success -
.
-- unused -
=
-- equality check, value assignment -
<
-- less than -
<=
-- less than or equal -
>
-- greater than -
>=
-- greater than or equal -
!=
-- not equal -
+=
-- add and assign -
-=
-- subtract and assign -
*=
-- multiply and assign -
/=
-- divide and assign -
%=
-- modulo and assign -
><
-- swap values -
in
-- check in range -
.=
-- fixed-point assign -
.+=
-- fixed-point add and assign -
.-=
-- fixed-point subtract and assign -
.*=
-- fixed-point multiply and assign -
./=
-- fixed-point divide and assign