Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 3.51 KB

Lua.md

File metadata and controls

40 lines (25 loc) · 3.51 KB

LUA (Language.Lua)

LUA has been implemented with the NLua engine.

Implementation / Compiler

Completeness

  • Syntax highlighting
  • Compilation (LUA is interpreted -> no compilation needed)
  • Execution
  • Console ouput
  • Return values
  • Diagnostics
  • Errors

Example code | Projects

About

To use LUA, the Fiddle directory (default: C:\Program Files\Fiddle) must contain the corresponding LUA library (or both): x64\lua52.dll and/or x86\lua52.dll. If your installation does not contain those libraries, you can extract them manually from the portable (Fiddle.zip) version.

Globals

You can use the following Globals/Variables inside your code:

  • Random (object, .NET System.Random, msdn): Create random numbers with Random:Next(..)

  • Console (object, .NET System.IO.StringWriter, msdn): Write to Console with Console:WriteLine(string) or Console:Write(string)

  • CurrentThread (object, .NET System.Threading.Thread, msdn): The thread this got initialized on (mostly UI Thread), can be used to access all properties or functions from a System.Threading.Thread.

  • Editor (object, Fiddle Fiddle.UI.Editor (from System.Windows.Window, msdn)): Fiddle's Editor window, can be used to access all UIElements, properties, public functions or functions derived from System.Windows.Window. (Editor XAML code, Editor source code)

  • App (object, .NET System.Windows.Application, msdn): Fiddle's calling Application/App, can be used to access all properties or functions derived from System.Windows.Application)

  • RunUi(Action) (function, void Invoke(Action), declaration): A function with an anonymous function or Action as a parameter to execute code on the UI Thread. This is required for getting/setting properties or calling functions from Editor or App because those are not thread safe.

Properties

/