Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Lua Programming/dofile

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

The dofile ../builtin function/ can be used to execute a /chunk/ of code stored in a file. In the following example, we have two files main.lua and sayit.lua. The main program (main.lua) calls the sayit program, which outputs a message to the screen: -- sayit.lua print("I am saying hello!") -- main.lua dofile("sayit.lua") dofile("sayit.lua")