Addons/script-engine/CCS Operators
Main operators
Navigation operators:
Sign | Operation |
---|---|
. | Browse in |
.. | Browse in as variable socket |
: | Operation (do sg) |
:: | Default getter |
; | (Command) end |
Main modifier operators:
Sign | Operation | Usage | Calculation | ρ |
---|---|---|---|---|
= | Set | x := a | x = a | |
! | Invert | x :! a x := !x | x = 0-a or switch value on 'a' boolean x = 0-x or switch value on 'x' boolean | |
@ | Nullize | x := @ x:@; x :@ a | x = null remove(x) x = a, remove(a) |
Persistence = ρ
Mathematical
Mathematical operators:
Sign | Operation | Usage | Calculation | ρ |
---|---|---|---|---|
+ | Increase by | x := a+b x :+ a | x = a+b x = x+b | 4 |
- | Decrease by | x := a-b x :- a | x = a-b x = x-a | 4 |
~ | Round | x := a1 x :~ 5 x :~ a | x = whole(a) x = (x/a)1 | ? |
* | Multiple by | x := a*b x :* a | x = a*b x = x*a | 3 |
/ | Divide by | x := a/b x :/ a | x = a/b x = x/a | 3 |
/+ | Remainder | x := a/+b x :/+ a | x = a - wholeOf(a / b)*b x = x - wholeOf(x / a)*a | 3 |
/~ | Flipped divide | x := a/~ bx :/ ~ a | x = b/a x = a/x | 3 |
/~ + | Flipped divide remaining | x := a/~ +bx :/ ~ + a | x = b - wholeOf(b / a)*a x = a - wholeOf(a / x)*x | 3 |
% | Percent of | x := a%b x :% a | x = a/b*100 x = x/a*100 | 3 |
%+ | Remaining of Percent of | x := a %+ b x :%+ a | x = 100 - a/b*100 x = 100 - x/a*100 | 3 |
%~ | Percent to me | x := a %~ bx :%~ a | x = b/a*100 x = a/x*100 | 3 |
%~ + | Percent to me remaining | x := a %~ + bx :% ~ + a | x = 100 - b/a*100 x = 100 - a/x*100 | 3 |
^ or ** | Square | x := a^ b <sub>or</sub> x := a** bx : ^ 3 <sub>or</sub> x :** 3 | x = ab x = x3 | 2.5 |
$ | Root (sqrt) | x := 2 $ a x :$ 4 | x = √a x = √√x | |
Ł | Logaritm | x := a Ł b a :Ł a | x = log<sub>a</sub>b x = log<sub>x</sub>a | |
Ł~ | Logaritm to me | x := a Ł~ ba :Ł ~ a | x = log<sub>b</sub>a x = log<sub>a</sub>x |
Persistence = ρ
Expression | Happening |
---|---|
object | Get value* |
object.field | Get value of field* |
object.method; | Calls the method on the object* |
* - and print if the expression is standalone (not an operandus, but the whole command line is itself).
Fields can got only one way, by the dot operator, followed by another dot operator or nothing.
Methods can be called more ways:
Expression | Happening |
---|---|
object.method; | Simply call the method without arguments |
object.method:; | Same as above, but can be continued. |
object.method:<args> | Calling the method with arguments |
object.method:<args>; | Same as above, but can be continued. |
Special navigation operators:
Expression | Happening |
---|---|
object:: | Uses the default getter of the object* |
object::; | Same as above, but can be continued.* |
object::<args> | Call the default getter with arguments.* |
object::<args>; | Same as above, but can be continued.* |
object.. | Can be continued as in case of dot operator, but object is handled as a value socket, not the value itself. |
object..; | Runs the value socket. Usually no definition written there, so nothing happens. |
object..:: | Gets the value socket itself. |
object..::; | Same as above, but can be continued. |
object..::<args> | Gets something from the variable socket (using its default getter). |
object..::<args>; | Same as above, but can be continued. |
object::.. | Would get a value from the default getter and handle it as a value socket, but the value is not socketed and it is a real java-handled value (high chance of that), so couldn't be handled as a socket. It will throw error with high chance. |
* - if there it is one to call
Referencial
Reference operators:
Expression | Name | a.socket | Definition | Ω |
---|---|---|---|---|
a := b | Copy | b.get | Give value | 0 |
a <- b | Weak | b. | 0 | |
a -> b | Write-only | 0 | ||
a <-> b | Direct | 0 | ||
a <-- b | Deep-reader | 0 | ||
a --> b | Deep-writer | 0 | ||
a <--> b | Deep | 0 | ||
a <-( b..socket) | Encapsule | b.socket? | 0 |
Desuetude Rate = Ω
Property | usage | examples | |
---|---|---|---|
Readonly(?) | |{operator} | |<-- | |<--> |
Deepblocked(?) | {operator}| | -->| | <--| |
Deepblocked readonly | |{operator}| | |<-->| | |<--| |
Persistances
ρ Persistance levels for operators:
0
- Primary
x.y
x?.y
f(x)
a[x]
a?[x]
x++
x--
1
- Unary
2
- Highdimensional
3
- 2nd dimensional
4
- Multiplicative
5
- Addictive
6
- Shift
7
- Relational
8
- Equality
9
- Logical AND
10
- Logical XOR
11
- Logical OR
12
- Conditional AND
13
- Conditional OR
14
- Conditional OR
15
- Conditional OR
16
- Conditional OR
17
- Conditional OR
18
- Null-coalescing
19
- Assigment and Lambda
Comments