Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 1.24 KB

File metadata and controls

16 lines (13 loc) · 1.24 KB

Reference Error {#reference-error}

An error due to the presence of undefined word(s) in the codes.

######Example 1

Error Message ![Reference Error Error Message 1](/assets/chapter_4_assets/Reference Error Error Message 1.png)
Bug example ✘ Source of error: a typographical error
![Reference Error Bug Example 1](/assets/chapter_4_assets/Reference Error Bug Example 1.png)
Correction ✔ Solution: replace the typo with the correct spelling
![Reference Error Correction 1](/assets/chapter_4_assets/Reference Error Correction 1.png)

######Example 2 | Error Message | ![Reference Error Error Message 2](/assets/chapter_4_assets/Reference Error Error Message 2.png)
| | --- | --- | | Bug example ✘ | Source of error: items created in a [For loop](../chapter_3_procedures/Loops.md) cannot be [referenced](../chapter_3_procedures/Rules.md) outside of the loop.
![Reference Error Bug Example 2](/assets/chapter_4_assets/Reference Error Bug Example 2.png)
| | Correction ✔ | Solution: define the items outside of the For loop by adding them into an external [list](../chapter_3_procedures/List.md).
![Reference Error Correction 2](/assets/chapter_4_assets/Reference Error Correction 2.png)
|