foxmishy 发表于 2006-11-9 16:48:37

自定义函数调用时提示参数错误!~

自定义函数调用时提示参数错误!~
语法错误,求教

foxmishy 发表于 2006-11-9 17:37:57

我自己来回答好叻,这个板块的人气很差,就和我那个QQ群一样死气。

小李美刀 发表于 2006-11-9 18:18:13

you are wrong

I think you are wrong, you need study more

the parameter class are in, out and inout, not int. this is C-like language not standard C language

now if you do not enter the parameter class then the default class is inout

understand ?

hope it help for you

foxmishy 发表于 2006-11-9 18:26:47

谢谢楼上得,我就没有对应过来,class are in, out and inout,但是我在TSL ONline上看到得
extern type function_name ( param1, param2,...);

The type refers to the return value of the function.Type can be one of the following:

char (signed and unsigned)        float
short (signed and unsigned        double
int (signed and unsigned)        string (equivalent to C char*)
long (signed and unsigned)

Each parameter must include the following information:
type [< size >]
mode        The mode can be in, out, or inout.The default is in.Note that these values must appear in lower case.


这又何解释,当时我就认为 认为Type应该是int。快晕叻。是否在Extern 函数申明中又另一种写法?楼上得有没有相关资料啊。谢谢啦,本人正水深火热中。

foxmishy 发表于 2006-11-9 18:43:59

这里有好东西。
http://bbs.51testing.com/viewthread.php?tid=5133&highlight=%B4%FA%C2%EB

foxmishy 发表于 2006-11-9 18:50:36

x=int(rand()*5)+5;
这个什么意思啊?int(变量)

小李美刀 发表于 2006-11-9 18:54:09

The extern function declaration is used to declare functions that are not part of TSL, but reside in external C libraries.

For more information on using C functions stored in external dlls, refer to your User's Guide.

int(); 对参数取整

[ 本帖最后由 小李美刀 于 2006-11-9 18:57 编辑 ]
页: [1]
查看完整版本: 自定义函数调用时提示参数错误!~