1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

doc: add global variables link (#16228)

This commit is contained in:
kahsa 2022-10-27 19:09:05 +09:00 committed by GitHub
parent 098db89b85
commit d653716292
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -343,11 +343,12 @@ the expression `T(v)` converts the value `v` to the
type `T`.
Unlike most other languages, V only allows defining variables in functions.
Global (module level) variables are not allowed. There's no global state in V.
By default V does not allow **global variables**. See more [details](#global-variables).
For consistency across different code bases, all variable and function names
must use the `snake_case` style, as opposed to type names, which must use `PascalCase`.
### Mutable variables
```v