aboutsummaryrefslogtreecommitdiffstats
path: root/docs/guide
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-01-27 13:28:07 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit3a8d30dbd116eb6a6239a6c0411ad26de9614527 (patch)
treed93abe76ac71e36e3a80b7d674db6ae38d68c66f /docs/guide
parentdocs: update extension guide (PureOp) (diff)
downloadalive-3a8d30dbd116eb6a6239a6c0411ad26de9614527.tar.gz
alive-3a8d30dbd116eb6a6239a6c0411ad26de9614527.zip
docs: show output samples on dark background
Diffstat (limited to 'docs/guide')
-rw-r--r--docs/guide/05_basic-types.md12
-rw-r--r--docs/guide/06_importing-operators.md4
2 files changed, 10 insertions, 6 deletions
diff --git a/docs/guide/05_basic-types.md b/docs/guide/05_basic-types.md
index c22929c..3137008 100644
--- a/docs/guide/05_basic-types.md
+++ b/docs/guide/05_basic-types.md
@@ -42,10 +42,12 @@ as the values type. Give it a try:
This will print the following:
- changes to files: values.alv
- trace "hello": <str= "hello">
- trace 2: <num= 2>
- trace true: <bool= true>
+```output
+changes to files: values.alv
+trace "hello": <str= "hello">
+trace 2: <num= 2>
+trace true: <bool= true>
+```
On the left side of the colon, [trace][] prints the expression that it is
evaluating. On the right side, three pieces of information are shown:
@@ -53,7 +55,7 @@ evaluating. On the right side, three pieces of information are shown:
- the *type*: `str`, `num`, `bool`
- the *value* itself: `"hello"`, `2`, `true`
- the *kind* of the result: `=`
-
+
`=` means that these values are *constant* - they will not change by themselves
until the code is changed. For simple values like these that seems obvious, but
in `alv` we can also create values tha change over time, as we will see soon.
diff --git a/docs/guide/06_importing-operators.md b/docs/guide/06_importing-operators.md
index 4321e7a..2195d5c 100644
--- a/docs/guide/06_importing-operators.md
+++ b/docs/guide/06_importing-operators.md
@@ -16,7 +16,9 @@ operators from a module, we need to tell `alv` to load it first: We can load
prints
- trace (+ 1 2): <num= 3>
+```output
+trace (+ 1 2): <num= 3>
+```
Because it can get a bit confusing when all imported operators are mixed in the
global scope, it is also possible to load the module into its own scope and use