Variables: Difference between revisions

add bQN
(add bQN)
Line 948:
 
bool: True or False
 
=={{header|BQN}}==
 
BQN variables are declared and initialized using the <code>←</code> symbol. The following code block creates a variable <Code>a</code> with value 10.
<lang bqn>a ← 10</lang>
 
Variables can be modified using the <code>↩</code> symbol after they are declared.
 
BQN uses lexical scoping, where scopes correspond roughly to the blocks they are contained in. A more detailed description can be found here: [https://mlochbaum.github.io/BQN/spec/scope.html BQN spec]
 
Variable names are restricted by the roles in BQN's context free grammar. Names are case-insensitive, and ignore underscores.
* A variable containing ordinary data must start with a lowercase letter.
* A variable containing a function must start with an uppercase letter.
* A variable containing a 1-modifier must start with an underscore, and must not end with an underscore.
* A variable containing a 2-modifier must start with an underscore, and must end with an underscore.
 
=={{header|Bracmat}}==
236

edits