Skip to content

Data And Operators

Stardust D.L edited this page Jan 18, 2018 · 2 revisions

Data Types

Number

  • Real numbers with precision 1e-100.

String

"str content"

  • + concat
  • * repeat

Collection

For more information, please use view(x) to get the list of the operations of collection

  • (a,b,c) Tuple

  • [a,b,c] List

  • {a,b,c} Set

  • + concat

  • - different

  • * cartesian product

Function

  • function: f=(arg1,arg2)=>func{...}

Class

  • class object: a=class{}
  • class definition: a=(_)=>class{...}

Iterator

  • iterator: i=iter{...}

Builtin Objects

Items Description
null Null value
true True True value
false False False value

Operators

Items Description
+ Plus
- Minus
* Multiply
/ Divide
% Mod
** Pow
& And
| Or
^ Xor
! Not
== Equal
!= Unequal
< Smaller
<= Not bigger
> Bigger
>= Not smaller
= Assign
:= ReAssign
+= Plus and Assign
-= Minus and Assign
*= Multiply and Assign
/= Divide and Assign
%= Mod and Assign
**= Pow and Assign
=> Lambda expression
in Be contained
a[index] Index expression
a[l,r] Slice
return <val> Return values
break Break statement
continue Continue statement
Clone this wiki locally