Lua

Lua 5.4 nel Terminale: prompt interattivo e script. Scrivi lua per il prompt, lua script.lua per eseguire un file da /sdcard/home.

versione 5.4.9 · Licenza: MIT · Sito del progetto

Lua

A cosa serve

Lua 5.4 è un linguaggio di scripting piccolo e veloce, molto usato nei giochi e nell'automazione. Qui hai sia il prompt interattivo, per provare al volo, sia l'esecuzione di file .lua.

Come si usa

Comando Cosa fa
lua apre il prompt interattivo (>)
lua script.lua esegue un file dalla cartella home
lua script.lua a b passa argomenti, letti in arg[1], arg[2]

Nel prompt scrivi un'espressione e premi Invio:

> 2^10
1024.0
> for i = 1, 3 do print(i) end

Per uscire: EOF, oppure os.exit().

Limiti

Non ci sono processi esterni: os.execute, io.popen, os.tmpname e io.tmpfile rispondono "not supported". Memoria disponibile: fino a 8 MB.

Nel Terminale

Lua

Lua 5.4 in the Terminal: interactive prompt and scripts. Type lua for the prompt, lua script.lua to run a file from /sdcard/home.

version 5.4.9 · License: MIT · Project site

Lua

What it is

Lua 5.4 is a small, fast scripting language, popular in games and automation. You get both the interactive prompt, to try things out, and .lua file execution.

How to use it

Command What it does
lua opens the interactive prompt (>)
lua script.lua runs a file from the home folder
lua script.lua a b passes arguments, read as arg[1], arg[2]

At the prompt type an expression and press Enter:

> 2^10
1024.0
> for i = 1, 3 do print(i) end

To quit: EOF, or os.exit().

Limits

There are no external processes: os.execute, io.popen, os.tmpname and io.tmpfile answer "not supported". Memory: up to 8 MB.

In the Terminal