HomeForumSourceResearchGuide
Sign in to contribute to source.
Type definition file .App by barry
expand copy to clipboardexpand
/*
{ "description" : "Container for a command-line parameter, used in the App interface."}
*/

data AppParam{
	/* {"@description" : "The text-based data delivered to a command-line parameter."} */
	char string[]
	}

/*
{ "description" : "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'."}
*/

interface App{
	/*
	{"@description" : "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)."}
	*/
	void setSourcePath(char path[], opt char dataPath[]){}

	/*
	{"@description" : "This function is called to start a program.",
		"params" : "Array of the command-line arguments with which the program was started."}
	*/
	int main(AppParam params[])
	}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n App.App -m "reason for update" -u yourUsername
Version 1 (this version) by barry
Notes for this version: Standard Library Initialisation