大哥们:
我的过程的参数的类型是自己定义的类型,代码如下:
type
Trecord=record
questiondesc:shortstring;
answer:shortstring;
option:shortstring;
useranswer:string;
correct:boolean;
score:integer;
end;
var
KPquestionform: TKPquestionform;
danxuanrecord:Trecord;
duoxuanrecord:Trecord;
panrecord:Trecord;
tianrecord:Trecord;
procedure TKPquestionform.recordtostructure(recordtype:Trecord);
var
number:integer;
tablename:string;
begin
if (QuestionType=1)then
tablename:='danxuan';
if (QuestionType=2)then
tablename:='duoxuan';
if (QuestionType=3)then
tablename:='tian';
if (QuestionType=4)then
tablename:='pan';
number:=recordarray[QuestionType,Knowledgepoint,nownumber[QuestionType,Knowledgepoint]];
recordtype.questiondesc:=getrecord(number,'QuestionDesc',tablename);
recordtype.answer:=getrecord(number,'Answer',tablename);
//recordtype.option:=getrecord(number,'Option');
recordtype.useranswer:='';
recordtype.correct:=false;
recordtype.score:=0;
describeM.Clear;
describeM.Lines.Add(recordtype.questiondesc);
if (recordtype=danxuanrecord)then
begin
recordtype.option:=getrecord(number,'Option',tablename);
describeM.Lines.Add(recordtype.option);
answerDAX.ItemIndex:=-1;
end;
if (recordtype=duoxuanrecord)then
begin
recordtype.option:=getrecord(number,'Option',tablename);
describeM.Lines.Add(recordtype.option);
anduxA.Checked:=false;
anduxB.Checked:=false;
anduxC.Checked:=false;
anduxD.Checked:=false;
end;
if (recordtype=panrecord)then//他说我数据类型不匹配
begin
answerPAN.ItemIndex:=-1;
end;
if (recordtype=tianrecord)then
answerTK.clear;end;
我的过程的参数的类型是自己定义的类型,代码如下:
type
Trecord=record
questiondesc:shortstring;
answer:shortstring;
option:shortstring;
useranswer:string;
correct:boolean;
score:integer;
end;
var
KPquestionform: TKPquestionform;
danxuanrecord:Trecord;
duoxuanrecord:Trecord;
panrecord:Trecord;
tianrecord:Trecord;
procedure TKPquestionform.recordtostructure(recordtype:Trecord);
var
number:integer;
tablename:string;
begin
if (QuestionType=1)then
tablename:='danxuan';
if (QuestionType=2)then
tablename:='duoxuan';
if (QuestionType=3)then
tablename:='tian';
if (QuestionType=4)then
tablename:='pan';
number:=recordarray[QuestionType,Knowledgepoint,nownumber[QuestionType,Knowledgepoint]];
recordtype.questiondesc:=getrecord(number,'QuestionDesc',tablename);
recordtype.answer:=getrecord(number,'Answer',tablename);
//recordtype.option:=getrecord(number,'Option');
recordtype.useranswer:='';
recordtype.correct:=false;
recordtype.score:=0;
describeM.Clear;
describeM.Lines.Add(recordtype.questiondesc);
if (recordtype=danxuanrecord)then
begin
recordtype.option:=getrecord(number,'Option',tablename);
describeM.Lines.Add(recordtype.option);
answerDAX.ItemIndex:=-1;
end;
if (recordtype=duoxuanrecord)then
begin
recordtype.option:=getrecord(number,'Option',tablename);
describeM.Lines.Add(recordtype.option);
anduxA.Checked:=false;
anduxB.Checked:=false;
anduxC.Checked:=false;
anduxD.Checked:=false;
end;
if (recordtype=panrecord)then//他说我数据类型不匹配
begin
answerPAN.ItemIndex:=-1;
end;
if (recordtype=tianrecord)then
answerTK.clear;end;
解决方案 »
- 关于Inherited 功能和 var的全局变量;请赐教(新手)
- 为什么BDN上有一些日文帖子而没有中文帖子?
- 为什么用我的代码不能画出预期的曲线图,Tchart控件
- 请教高手:在DBGridEh中能对clientdataset数据集实现多列排序吗?(按ctrl键点击标题可选择按多列)
- 在DELPHI中,用那个控件能把.RTF文件按原有的格式显示在屏幕上!
- com的问题,急!
- 下载不了
- 在delphi中如何生成可执行文件
- Shiori Player 测试版出炉
- 菜鸟问题: Access Violation at address in module 'Test.exe' read of address FFFFFFFF
- 我用DELPHI的写的界面能否被VB调用?
- 怎么把wideString变成String
函数体里的
if (recordtype=danxuanrecord)then
调试时出现说类型不匹配!
为啥?
请指教!