mirror of
https://github.com/NixOS/nix
synced 2025-06-28 22:01:15 +02:00
docs: add variables; rework scope (#11062)
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
This commit is contained in:
parent
b24757f08a
commit
6ed67d35ed
4 changed files with 35 additions and 10 deletions
10
doc/manual/src/language/variables.md
Normal file
10
doc/manual/src/language/variables.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Variables
|
||||
|
||||
A *variable* is an [identifier](identifiers.md) used as an expression.
|
||||
|
||||
> **Syntax**
|
||||
>
|
||||
> *expression* → *identifier*
|
||||
|
||||
A variable must have the same name as a definition in the [scope](./scope.md) that encloses it.
|
||||
The value of a variable is the value of the corresponding expression in the enclosing scope.
|
Loading…
Add table
Add a link
Reference in a new issue