One of implementation of scope variables is grouping of variables to virtual scopes.
It is not necessary that scope names can be only DEF function names. Your own scopes are created automatically when you declare scope variable.
For example, you can write:
SCR.WIDTH = SCREEN_WIDTH()
SCR.HEIGHT = SCREEN_HEIGHT()
This way you automatically create "SCR" scope. When you pause your program, all variables are listed grouped by their scopes, so you will see:
SCR:
WIDTH = …
HEIGHT = …
This approach can help you organize variables into scopes for better program layout.
Using scope variables
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag: