function.as

来自「Ming is a library for generating Macrome」· AS 代码 · 共 45 行

AS
45
字号
var f1 = function(){	return "anonymous function() works";}; // we need a semicolon to end a statement !// // 'Function' is not recognized, try using 'new Function' instead// var f2 = Function()// {// };function test(){	return "function <name>() works";} // no need to terminate with a semicolon// // 'Function' is a reserved word// Function test()// {// 	// I don't think this should work // } // no need to terminate with a semicolontrace(test instanceOf Function);// 'function' is a reserved word// trace(test instanceOf function);// This is the one that failed with tknip patch for AS2 supportfunction getName():Object { return this.name; }var f1:String = function():String{	return "anonymous function() works";}; // we need a semicolon to end a statement !function foo(x:Number, y:Object){	;}function bar(){	return new this;}

⌨️ 快捷键说明

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