hello.jc

来自「The JILRunOnly project is a simple comma」· JC 代码 · 共 33 行

JC
33
字号
/*
 *	hello.jc
 *
 *	A simple test script for the "jilrun" console application
 */

import stdlib;

/*
 *	function main
 *
 *	"jilrun" expects this function as main entry point.
 *	Any parameters given to "jilrun" will be given to this
 *	function as an array of strings.
 *	The first element in the array is the name (and path)
 *	of the script beeing executed.
 *	The function should return a value of arbitrary type.
 */

function string main( const array& args )
{
	stdlib::Print( "Hello World!\n" );
	stdlib::Printf( "Number of arguments: %d\n", args.length );

	stdlib::Print( "Listing arguments:\n" );
	for( long i = 0; i < args.length; i++ )
	{
		stdlib::Printf( "%d: %s\n", {i, args[i]} );
	}

	return "Done.";
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?