18,700
edits
(→fork: I suppose it's worth noting this bug with "fork") |
(→Compound statements: link fixes; let's not encourage weird syntax) |
||
Line 38: | Line 38: | ||
} | } | ||
The purpose of doing this is to group some statements under either a function declaration (see [[#Declaration|Declaration]]) or an "if" statement (see [[#Conditional|Conditional]]). Such a group of statements is referred to as a block, and is also said to be in a scope. Traditionally in programming, anything inside a certain level of shared braces can be seen from elsewhere within those braces, or from within a scope inside that scope, but not from a scope outside that scope. This allows careful management of which code can alter which data. In BSL's case, there are certain issues with scope not being respected (see the [[#if|if statement]] section). Variables outside of all scopes (such as functions) are referred to as "globals". | |||
The purpose of doing this is to group some statements under | |||
===Comments=== | ===Comments=== |