Skip to content

Commit

Permalink
Turn abs example back into an mdtest
Browse files Browse the repository at this point in the history
  • Loading branch information
philrz committed Dec 13, 2024
1 parent affe782 commit 8939f45
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions docs/language/functions/abs.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ must be a numeric type.

### Examples

{{< super-playground "yield abs(this)" >}}
Absolute value of a various numbers:
```mdtest-command
echo '1 -1 0 -1.0 -1(int8) 1(uint8) "foo"' | super -z -c 'yield abs(this)' -
```

```mdtest-output
1
1
-1
0
-1.0
-1(int8)
1.
1(int8)
1(uint8)
"foo"
{{</ super-playground >}}
error({message:"abs: not a number",on:"foo"})
```

0 comments on commit 8939f45

Please sign in to comment.