Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scope / global variables
#2
Scripts run in separate processes. Even the same script runs in new process each time. Each process has its own static variables, and they disappear when the process ends. There is no variable scope that spans multiple processes.

If you used QM, its global variables have the same lifetime as the QM process. And QM macros by default run in QM process. Now, when you use LA, do you need global variables that have the same lifetime as the LA process? Or should they persist even longer? Or shorter?

To share values between processes, can be used a file, registry, shared memory, etc, depending on how you want to use them. It's possible to implement it. But the implementation and usage depends on the variable type (simple types like int, strings, arrays, class/struct). Can you give a description and example of where/how you will use such variables?


Messages In This Thread
scope / global variables - by cuitino - 09-26-2024, 09:02 PM
RE: scope / global variables - by Gintaras - 09-27-2024, 05:13 AM
RE: scope / global variables - by Gintaras - 09-27-2024, 08:36 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)