Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Every Translator component contains an entrypoint, the main.lua module.

This module contains the main function.

When you start a component, the Translator runs the main function in main.lua — this only occurs once when the component starts. Every time a running component receives a message, the main function is called.

This affects the way you use variables as they are initialized at different times depending on where they are declared.

  • Variables declared outside the main function are initialized once when the component is started.

  • Variables declared within the main function are initialized every time a message is processed by the Translator.

  • No labels