共用方式為


FunctionExpression.JScriptFunctionExpression 方法

定義

使用指定的資訊,建立新的函式物件。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 static Microsoft::JScript::FunctionObject ^ JScriptFunctionExpression(RuntimeTypeHandle handle, System::String ^ name, System::String ^ method_name, cli::array <System::String ^> ^ formal_params, cli::array <Microsoft::JScript::JSLocalField ^> ^ fields, bool must_save_stack_locals, bool hasArgumentsObject, System::String ^ text, Microsoft::JScript::Vsa::VsaEngine ^ engine);
public static Microsoft.JScript.FunctionObject JScriptFunctionExpression (RuntimeTypeHandle handle, string name, string method_name, string[] formal_params, Microsoft.JScript.JSLocalField[] fields, bool must_save_stack_locals, bool hasArgumentsObject, string text, Microsoft.JScript.Vsa.VsaEngine engine);
static member JScriptFunctionExpression : RuntimeTypeHandle * string * string * string[] * Microsoft.JScript.JSLocalField[] * bool * bool * string * Microsoft.JScript.Vsa.VsaEngine -> Microsoft.JScript.FunctionObject
Public Shared Function JScriptFunctionExpression (handle As RuntimeTypeHandle, name As String, method_name As String, formal_params As String(), fields As JSLocalField(), must_save_stack_locals As Boolean, hasArgumentsObject As Boolean, text As String, engine As VsaEngine) As FunctionObject

參數

handle
RuntimeTypeHandle

函式的型別控制代碼。

name
String

函式的名稱。

method_name
String

函式的名稱。

formal_params
String[]

函式的參數。

fields
JSLocalField[]

函式的欄位。

must_save_stack_locals
Boolean

true 表示儲存區域堆疊變數。 這對巢狀函式存取它的其中一個區域變數或是對 eval 陳述式來說都十分重要。

hasArgumentsObject
Boolean

如果函式有參數陣列則為 true

text
String

函式宣告的文字。

engine
VsaEngine

指令碼引擎的參考。

傳回

FunctionObject

新的函式物件。

適用於