Check out Modern Chess, our featured variant for January, 2025.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, Jun 21, 2016 09:15 PM UTC:

There is a catch to changing how variable scoping works in GAME Code. It currently supports block scoping. This means that blocks of code that appear between if and endif, do and loop, for(each) and next, or switch and endswitch increases the scope. Since PHP and JavaScript, the two main languages I program Game Courier in, do not use block scoping, I am not used to it, and I do not use it much in GAME Code, though I have used it a little bit. The main advantage to block scoping is that it will let you use variable names in blocks that might have a different use outside the blocks. The advantage to eliminating block scoping is that it allows the interpreter to handle variables more quickly, because there is no searching down levels of scope for the matching variable. Another possible advantage is that it may simplify how variables work, making it easier to add better support for multidimensional arrays. But to make this change, I'll have to check whether scope plays any functional role in how the control structures work.