U
ucg1987
Unregistered / Unconfirmed
GUEST, unregistred user!
申明了两个类 TAtomPoistion=record //原子等效点系坐标 AtomX:double; AtomY:double; AtomZ:double; end; TNonRepAtomPoistion=record //不重复的原子等效点系坐标 AtomSybol:string; AtomPoistion:Array of TAtomPoistion; //动态数组用于存储不重复的原子坐标 NumOfAtomPoistion:integer; end;var NonRepAtomPoistion:Array of TNonRepAtomPoistion;。。。。。for i:=0 to NumOfAtomInfo-1 dobegin try SetLength(NonRepAtomPoistion.AtomPoistion,AtomInfo .AtomMultiplicity);// 重复点数 except messagedlg('分配内存出错',mtError,[mbok],0);。。。。。 end;程序每次在i=2 ,AtomInfo.AtomMultiplicity=1时在Setlength()这行跳出一个CPU调试窗口Thread #$0000ED0,并提示“xxx.exe faulted with message:'access violation at 0x004066dd:write of address 0x00040db0' Process Stopped .Use Step or run to continue.” 但是在第0、1次中SetLength()可正常开辟动态空间,这是什么原因?调试一天未果, 毕业设计期限将至, 望众高手搭救!! 不胜感激谢……