Are there any disadvantages to dispensing with global variables?
If there are, no-one has reported them yet. It’s common in some other programming languages not to use a lot of global variables. It certainly makes things a good deal easier to code and trace. You never have to declare globals at the beginning of a handler and that saves time. Very often you don’t know in advance, which globals are going to be need in a handler but you still have to declare in the handler. For example, consider a switch where each case is going to need a different set of globals. Yes, you can declare globals on the fly as you drop into each case that uses them but it does get confusing and each time you do, SuperCard has to locate the globals all over again. With the YAVglobal, you have all your data in one place, stored as “records” in a large multidimensional array. You can set or get (using “Sett” or “Gett”) any of these global records from anywhere without needind a global declaration: simply use a function statement instead (after which, if you need that data mor