data type for Agilent VEE import library

直接貼help

The Definition File

The Call object or Formula expression determines the type of data it should pass to the function based on the contents of the definition file.

The definition file defines the type of data the function returns, the function name, and the arguments the function accepts.

The data has the following form:<return type> <function name> (<type> <paramname>, <type> <paramname>, ...) ;

Where:

‧    <return type> can be: byte, word, int, short, long, int64,  float, double, char*, VEE_BOOL, or void.

‧    <function name> can be a string consisting of an alpha character followed by alphanumeric characters, up to a total of 512 characters.

‧    <type> can be: byte, word, int, short, long, int64,  float, double, VEE_BOOL, byte*, word*, int*, char*, short*, long*, int64*,  float*, double*, char**, VEE_BOOL*, or void.

‧    <paramname> can be a string consisting of an alpha character followed by alphanumeric characters, up to a total of 512 characters. 

     The parameter names are optional, but recommended. If a parameter is to be passed by reference, the parameter name must be preceded by the indirection symbol (*).

The valid return types are:

‧    character strings (char*, corresponding to the VEE Text data type)

‧    integers (byte, word, short, int, long, int64, VEE_BOOL, corresponding to the VEE Uint8, UInt16,Int16, Int32,Int64, and Boolean data types)

‧    single and double precision floating point real numbers (float and double corresponding to the VEE Real32 and Real64 data types).

If you specify "pass by reference" for a parameter by preceding the parameter name with *, VEE will pass the address of the information to your function. 

If you specify "pass by value" for a parameter by leaving out the *, VEE will copy the value (rather than the address of the value) to your function.

You will want to pass the data by reference if your external routine changes that data for propagation back to VEE. 

All arrays must be passed by reference.Any parameter passed to a Compiled Function by reference is available as an output terminal on the Call object.

The output terminals will be Ret Value for the function's return value, plus an output for each input parameter that was passed by reference.VEE pushes 144 bytes on the stack.

This allows up to 36 parameters to be passed by reference to a Compiled Function. Up to 36 long integer parameters or 18 double-precision floating-point parameters may be passed by value.

VEE allows both "enclosed" comments and "to-end-of-line" comments in the definition file.

"Enclosed" comments use the delimiter sequence /*comments*/, where /* and */ mark the beginning and end of the comment, respectively. 

"To-end-of-line" comments use the delimiting characters // to indicate the beginning of a comment that runs to the end of the current line.

转载于:https://www.cnblogs.com/dforce/articles/1790659.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值