1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Update documentation

This commit is contained in:
Étienne Fildadut 2022-01-16 00:21:28 +01:00
parent f05ccdffcc
commit dc0b8f627c
2 changed files with 9 additions and 2 deletions

View file

@ -835,11 +835,12 @@ From lowest to highest priority:
_;_ _;
_:=_ _+=_ _-=_ _//=_ _/=_ _*=_ _%=_ _^=_
_,_
_=_
_|_ _&_ _~?_ _~_ _#_
_!=_ _==_ _>=_ _<=_ _<_ _>_
_+_ _-_
_*_ _//_ _/_ _%_
_::_ _=_
_::_
-_ !_
_^_
_._ _!_
@ -882,7 +883,7 @@ These only work on numbers.
`a + b`: evaluate a and b, returns their sum.
`-`, `*`, `/`, `//`, `^`: same for substraction, multiplication, division, integer division, exponentiation
`-`, `*`, `/`, `//`, `^`, `%`: same for substraction, multiplication, division, integer division, exponentiation, modulo
`-a`: evaluate a, returns its opposite
@ -962,6 +963,10 @@ This only works on strings:
`random(...)`: same arguments as before, but execute a random element at every execution.
##### String methods
`len(string)`: returns length of the string in UTF-8 characters
##### Various
`alias(ref::reference, alias::string)`: define an alias `alias` for the variable or function referenced by `ref`. Expect fully qualified names for the alias.

View file

@ -99,3 +99,5 @@ Advantages:
Disadvantages:
* idk if it's worth the trouble
* could do something like `$ ()(l::list(?), i::number)::?`, but then can't return nil on not found...
TODO: write a translation guide/simplify translation process