Hello World
The traditional first program in a language outputs the message Hello World. In Lua it is
print "Hello World"
Create a textfile, named HelloW, containing just this line, save it somewhere and give it the filetype Lua (which is 18C in hexadecimal). If you double-click on it it will open a command-window containing its message Hello World. If you want to run HelloW in a taskwindow click Select (the left mouse button) on !rlua's iconbar icon; this opens RiscLua's Utilities directory. Then doubleclick on !TaskW. This will put !TaskW's icon on the iconbar. Dragging HelloW onto that will run HelloW in a taskwindow.
When !rlua is filer_booted or first seen by the filer, it creates the filetype Lua. It also creates the *command lua. If you use this in a taskwindow with no arguments it will change the *-prompt to > to show that it is ready to interpret statements in Lua. This is rather like BASIC. You can recover the *-prompt by entering os.exit ( ). This method may be convenient for quick calculations but be warned that it cannot properly reproduce the results of a program stored in a file of type Lua. That is because each line entered at the >-prompt constitutes a separate scope. Scoped local variables are fundamental to Lua, and these cannot be used to the same effect line by line.