51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2843|回复: 6
打印 上一主题 下一主题

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

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-11-9 16:48:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
自定义函数调用时提示参数错误!~
语法错误,求教

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2006-11-9 17:37:57 | 只看该作者
我自己来回答好叻,这个板块的人气很差,就和我那个QQ群一样死气。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 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
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 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:
[mode] type [name] [< 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 函数申明中又另一种写法?楼上得有没有相关资料啊。谢谢啦,本人正水深火热中。
回复 支持 反对

使用道具 举报

该用户从未签到

5#
 楼主| 发表于 2006-11-9 18:43:59 | 只看该作者
回复 支持 反对

使用道具 举报

该用户从未签到

6#
 楼主| 发表于 2006-11-9 18:50:36 | 只看该作者
x=int(rand()*5)+5;
这个什么意思啊?int(变量)
回复 支持 反对

使用道具 举报

该用户从未签到

7#
发表于 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 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-10-7 17:36 , Processed in 0.080619 second(s), 24 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表