🚀 Exciting Update: Introducing Modules to Enhance Scripting! 🚀

Started by Theo Gottwald, January 22, 2024, 09:36:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Theo Gottwald

We're thrilled to announce a game-changing update that's set to revolutionize the way we handle scripting in our projects. Say goodbye to the confusion and limitations of using the same variables across different scripts. Welcome to the era of Modules! 🎉

📦 What Are Modules?
Modules act as unique namespaces for your global variables, meaning each module you create has its own isolated space for variables. No more clashes or unexpected overwrites! Variables like $$INP, $$TXT, and $$FIL can now be managed more efficiently and clearly. 🤓

Global Variables Made Easy: Inside a module, all variables prefixed with $$ are local to that module. Switching between modules? Variables adapt accordingly, carrying values specific to their module or coming up undefined if not set.
Simplified Management: Up to 255 modules can be created, each with its own set of variables. This makes organizing your scripts cleaner and more manageable.
Case Insensitivity: Module names are converted to lowercase internally for seamless integration and less hassle.
Flexible Naming: Can't think of a name? No problem! Specify a number, and it automatically gets a "Module_" prefix, making it easy to reference.
🔄 Importing and Exporting Variables
Need to share data between modules? We've got you covered. With options to either copy (BYVAL) or move (BYREF) variables, transferring data between module spaces is a breeze. Whether you're duplicating a variable or moving it entirely, control is in your hands. 🔄

🔢 Numbered Modules vs. Named Modules
Choose your style:

Numbered Modules: Jump directly into any module by number (0-255) using the MOD. command. Perfect for quick access!
Named Modules: For those who prefer a bit more organization, naming your modules provides clarity and ease of use. Names are given on a first-come, first-serve basis, with numbers assigned in the order of creation.
💡 Why This Matters
With the introduction of modules, variables like §§XXX might become obsolete, making your scripts faster and more efficient. This update isn't just a new feature; it's a new way to think about and construct your scripts for better performance and readability.

🤔 Ready to Dive In?
Start experimenting with modules in your projects today and see the difference for yourself. Whether it's keeping your variables organized, transferring data between scripts, or simply making your scripting environment more manageable, modules are here to elevate your scripting game.

PS: It will be published in few days together with the new CLB.-Clipboard-Commands.

Let's embrace this new chapter together! Share your experiences, tips, and questions right here. How will you use modules in your next project? 🌈