Interface App
access this type via: App (provides, requires or uses)
This interface is used by the entry-point component of a Dana program; a component must implement this interface to be executable by the Dana interpreter. The params[] array is populated with any parameters that follow the program name. As an example, issuing the command 'dana MyApp xyz 123' creates a params array with 2 cells, the first cell containing 'xyz' and the second containing '123'.
Functions
void setSourcePath(char path[], optional char dataPath[])
int main(AppParam params[])
void setSourcePath(char path[], optional char dataPath[])
This function provides the fully-qualified path to the directory containing this component's compiled object file. It is called before main(), and can be useful to access the path from which additional assets of a program may be located (such as graphics objects for GUI applications). The dataPath parameter, if set, indicates a specific location at which the program should store any writable user data such as configuration parameters. If dataPath is not set the program should decide independently where to place such data (such as in its source path).
int main(AppParam params[])
This function is called to start a program.
params Array of the command-line arguments with which the program was started.