定义一个枚举类
TOperation=(TEST_START,TEST_END);一个函数,其中一个行参定义为枚举类TOperation
function TMyRS232.AT_VibratorTest(operation: TOperation;
var errormsg: string): boolean;
begin
case operation of
TEST_START:
cmdstring:='AT+CVIB=1';
TEST_END:
cmdstring:='AT+CVIB=0';
end;
//.....end;我试着用以下方法来调用这个函数
1。AT_VibratorTest(TEST_START,errormsg) 出错****************************************************2。AT_VibratorTest([TEST_START],errormsg) 出错***************************************************3。
var operation_type:TOperation
begin
operation_type:=[TEST_START]; 也出错
AT_VibratorTest(operation_type,errormsg) 请问我该怎么调用这个函数???
TOperation=(TEST_START,TEST_END);一个函数,其中一个行参定义为枚举类TOperation
function TMyRS232.AT_VibratorTest(operation: TOperation;
var errormsg: string): boolean;
begin
case operation of
TEST_START:
cmdstring:='AT+CVIB=1';
TEST_END:
cmdstring:='AT+CVIB=0';
end;
//.....end;我试着用以下方法来调用这个函数
1。AT_VibratorTest(TEST_START,errormsg) 出错****************************************************2。AT_VibratorTest([TEST_START],errormsg) 出错***************************************************3。
var operation_type:TOperation
begin
operation_type:=[TEST_START]; 也出错
AT_VibratorTest(operation_type,errormsg) 请问我该怎么调用这个函数???
解决方案 »
- 关于OpenDialog的问题!!
- 新建的delphiQQ群 欢迎各位新手老手朋友加入~~
- 传奇1.5(delphi源码)
- 用TOraQuery控件连接Oracle 9, 插入数据出错的问题??
- 在iwactive中如何访问activex的属性与方法?
- 菜鸟提问 谢谢各位帮忙
- 全屏播放POWERPOINT幻灯片的命令行方式是什么啊?我们的触摸屏要用啊.(windows启动时自动启动幻灯片)
- 跪求用Java语言实现试卷的难度与区分度 信度评估算法的源代码
- 请教Delphi中各种进制及字符间的相互转换
- delphi xe10 编译提示armlinuxandroideabild.exe找不到
- DELPHI 连接SQL,通过ODBC ,怎样配置ODBC???
- 为什么我使用Insert后,adotable还是无法进入插入记录状态?
Incompatible types:'TOperation' and 'procedure ,untyped pointer or untyped parameter'
Incompatible types:'TOperation' and 'procedure ,untyped pointer or untyped parameter'还有TOperation 和 AT_VibratorTest 是写在组件里头的,那么如果我要调用的话是不是要在本地再定义一下TOperation=(TEST_START,TEST_END)