docs: float exponential syntax (#10973)

pull/10984/head
Lukas Neubert 2021-07-28 07:21:42 +02:00 committed by GitHub
parent 45ad48d76a
commit 64458c9308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 4 deletions

View File

@ -624,6 +624,13 @@ f2 := f32(3.14)
If you do not specify the type explicitly, by default float literals
will have the type of `f64`.
Float literals can also be declared as a power of ten:
```v
f0 := 42e1 // 420
f1 := 123e-2 // 1.23
f2 := 456e+2 // 45600
```
### Arrays
#### Basic Array Concepts
Arrays are collections of data elements of the same type. They can be represented by