Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This is a central concept in writing good code. A function allows you to make a small piece of code which does one thing well and often can be reused if the same functionality is needed in multiple places. Functions apply a core design principal: /wiki/spaces/IXB/pages/3181903910.

Functions are Block statements.

Here’s a simple example:

function APPhello()
  return "Hello";
end 

Arguments are variables which are used to pass data into a function. For example:

local arg1 = "Hello"

function APPhello(arg1)
  return arg1 -- "Hello"
end 

See:

  • No labels