该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


Declares the return type and argument types for the specified function so that it can be successfully invoked. You can use one of the named arguments for Convention: STDCALL or PASCAL, or CDECL. The type argument for Returns takes the same named arguments as Arg.
Arg is optional and can appear multiple times, once for each argument to be sent to the function.
Type is one of these keywords that specifies the argument type: Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float, Double, AnsiString, UnicodeString, Struct, IntPtr, UIntPtr, or ObjPtr.
"description" is an optional string that describes the argument for reference.
access_mode is an optional keyword that specifies how the argument is passed. input specifies that the argument is passed by value. output specifies that the argument is passed by address with the initial value undefined. update specifies that the argument is passed by reference and the value of the JSL variable is set as the initial value. The default value is input.
array is an optional keyword. It is valid only if the Type is specified as Double and the access_mode is specified as either input or update. Specifies that the exported function expects an array of doubles.
An optional keyword that specifies the calling convention: STDCALL or PASCAL, or CDECL. The default value is STDCALL. STDCALL and PASCAL are equivalent.
Optional. Specifies the data type that the function returns: Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float, Double, AnsiString, UnicodeString, Struct, IntPtr, UIntPtr, or ObjPtr.
Optional and can appear multiple times. If an exported DLL function requires that a structure argument be passed in as an argument, use StructArg to declare the structure members. The Arg arguments use the same syntax as for Arg arguments to DeclareFunction (one for each structure member), an access_mode indicator and a pack_mode indicator.
access_mode is an optional keyword that indicates whether the struct argument should be passed by value (input) or by reference (update).
pack_mode is an optional integer that determines how the structure is packed. Valid values are 1, 2, 4, 8, and 16. The default value is 8.
description is an optional, quoted string that contains a description of the structure for reference.
Optional argument. AutoDeclare(1) and AutoDeclare(Verbose) write verbose messages to the log. AutoDeclare(Quiet) turns off log window messages. If you omit this option, verbose messages are written to the log.
Optional argument. When you use Declare Function(), this option turns off log window messaging (Quiet) or turns on log window messaging (Verbose).