EnglishFrenchSpanish

OnWorks favicon

lua50 - Online in the Cloud

Run lua50 in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command lua50 that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


lua - Lua interpreter

SYNOPSIS


lua [ options ] [ script [ args ] ]

DESCRIPTION


lua is the stand-alone Lua interpreter. It loads and executes Lua programs, either in
textual source form or in precompiled binary form. (Precompiled binaries are output by
luac, the Lua compiler.) lua can be used as a batch interpreter and also interactively.

The given options (see below) are executed and then the Lua program in file script is
loaded and executed. The given args are available to script as strings in a global table
named arg. If these arguments contain spaces or other characters special to the shell,
then they should be quoted (but note that the quotes will be removed by the shell). The
arguments in arg start at 0, which contains the string `script'. The index of the last
argument is stored in arg.n. The arguments given in the command line before script,
including the name of the interpreter, are available in negative indices in arg.

At the very start, before even handling the command line, lua executes the contents of the
environment variable LUA_INIT, if it is defined. If the value of LUA_INIT is of the form
`@filename', then filename is executed. Otherwise, the string is assumed to be a Lua
statement and is executed.

Options start with - and are described below. You can use -- to signal the end of
options.

If no arguments are given, then -v -i is assumed when the standard input is a terminal;
otherwise, - is assumed.

In interactive mode, lua prompts the user, reads lines from the standard input, and
executes them as they are read. If a line does not contain a complete statement, then a
secondary prompt is displayed and lines are read until a complete statement is formed or a
syntax error is found. So, one way to interrupt the reading of an incomplete statement is
to force a syntax error: adding a `;' in the middle of a statement is a sure way of
forcing a syntax error (except inside multiline strings and comments; these must be closed
explicitly). If a line starts with `=', then lua displays the values of all the
expressions in the remainder of the line. The expressions must be separated by commas.
The primary prompt is the value of the global variable _PROMPT, if this value is a string;
otherwise, the default prompt is used. Similarly, the secondary prompt is the value of
the global variable _PROMPT2. So, to change the prompts, set the corresponding variable
to a string of your choice. You can do that after calling the interpreter or on the
command line with _PROMPT=´lua: ´, for example. (Note the need for quotes, because the
string contains a space.) The default prompts are ``> '' and ``>> ''.

OPTIONS


- load and execute the standard input as a file, that is, not interactively, even
when the standard input is a terminal.

-e stat
execute statement stat. You need to quote stat if it contains spaces, quotes, or
other characters special to the shell.

-i enter interactive mode after script is executed.

-l file
call require(file) before executing script. Typically used to load libraries
(hence the letter l).

-v show version information.

-P suppress the creation of a standard LUA_PATH variable. Use this if you need to run
scripts which conflict with system-installed libraries.

Use lua50 online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    PyQt
    PyQt
    PyQt is the Python bindings for
    Digia's Qt cross-platform
    application development framework. It
    supports Python v2 and v3 and Qt v4 and
    Qt v5. PyQt is avail...
    Download PyQt
  • 2
    Sardi
    Sardi
    Sardi is a complete restyling and
    optimisation of svg code. 6 choices for
    your applications and 10 kind of folders
    to use in your file manager. The sardi
    icons...
    Download Sardi
  • 3
    LMMS Digital Audio Workstation
    LMMS Digital Audio Workstation
    LMMS is a free cross-platform software
    which allows you to produce music with
    your computer. If you like this project
    consider getting involved in the project
    h...
    Download LMMS Digital Audio Workstation
  • 4
    FreeRTOS Real Time Kernel (RTOS)
    FreeRTOS Real Time Kernel (RTOS)
    FreeRTOS is a market-leading real-time
    operating system (RTOS) for
    microcontrollers and small
    microprocessors. Distributed freely
    under the MIT open source lice...
    Download FreeRTOS Real Time Kernel (RTOS)
  • 5
    Avogadro
    Avogadro
    Avogadro is an advanced molecular
    editor designed for cross-platform use
    in computational chemistry, molecular
    modeling, bioinformatics, materials
    science and ...
    Download Avogadro
  • 6
    XMLTV
    XMLTV
    XMLTV is a set of programs to process
    TV (tvguide) listings and help manage
    your TV viewing, storing listings in an
    XML-based format. There are utilities to
    do...
    Download XMLTV
  • More »

Linux commands

Ad