docs: float exponential syntax (#10973)
parent
45ad48d76a
commit
64458c9308
|
@ -624,6 +624,13 @@ f2 := f32(3.14)
|
||||||
If you do not specify the type explicitly, by default float literals
|
If you do not specify the type explicitly, by default float literals
|
||||||
will have the type of `f64`.
|
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
|
### Arrays
|
||||||
#### Basic Array Concepts
|
#### Basic Array Concepts
|
||||||
Arrays are collections of data elements of the same type. They can be represented by
|
Arrays are collections of data elements of the same type. They can be represented by
|
||||||
|
|
Loading…
Reference in New Issue