Skip to main content

Let Alias For Local

You can optionally use 'let' instead of 'local' when declaring scoped variables.

To enable the let keyword, simply do:

pluto_use let

The usage is exactly the same as the local keyword.

However, note that this will make let a reserved keyword, so you can't name any variables as such. If this is causing ambiguities in your script, you can disable it again after you're done with it:

pluto_use let = false

For integrators

You can enable let in your Pluto environment by default by defining the PLUTO_USE_LET macro in luaconf.h or your build config.