Modifying Action Diagrams › Understanding Contexts › Function Contexts › LCL › Special Considerations
Special Considerations
- Internally, the generators create a new field for each function in which a LCL field is declared. As a result, although the LCL context defines fields that are local to a particular function, another function can change the value of the field. For example, a LCL field passed to another function as a Both parameter can be changed by the called function.
- A given program can have up to 9999 LCL parameters.
- For internal functions that are not implemented as shared subroutines, only one LCL variable is generated; in other words, all instances of the internal function share the same local variable. Thus, the LCL context is only logically local to a particular function.