doc: exit(), panic()

pull/6212/head
Alexander Medvednikov 2020-08-24 11:45:40 +02:00 committed by GitHub
parent 55e75d57ae
commit 35aeb308c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -48,7 +48,7 @@ you can do in V.
</td><td width=33% valign=top>
* [println](#println)
* [println and other builtin functions](#println-and-other-builtin-functions)
* [Functions 2](#functions-2)
* [Pure functions by default](#pure-functions-by-default)
* [Mutable arguments](#mutable-arguments)
@ -1324,7 +1324,7 @@ vs
println('Top cities: $top_cities.filter(.usa)')
```
## println
## println and other builtin functions
`println` is a simple yet powerful builtin function. It can print anything:
strings, numbers, arrays, maps, structs.
@ -1354,6 +1354,15 @@ println(red)
If you don't want to print a newline, use `print()` instead.
The number of builtin functions is low. Other builtin functions are:
```
fn exit(exit_code int)
fn panic(message string)
fn print_backtrace()
```
## Modules
V is a very modular language. Creating reusable modules is encouraged and is