Strict
Strict
Parameters
- None.
Description
Put at the top of a file, Strict makes every variable in that file need declaring, with Local, Global, Const, as a function's parameter, or as the variable of a For loop, before it is used. Without it, a misspelt name quietly makes a new variable that starts at 0, which is one of the hardest mistakes to find; with it, the misspelling is an error that points at the line. Files without Strict work as before.
Example
StrictLocal score = 0scroe += 10 ; error: 'scroe' has not been declared
