16,749
社区成员
发帖
与我相关
我的任务
分享
定义一个动态数组来存储:
const initLen=10;
a:array of char;
SetLength(a,initLen);
a[1]:='1'
……
……
……
SetLength(a,initLen+N);//N可以自己去设置
type
Tmyint64=record
hi:int64;
lo:int64;
end;
var
myint64:Tmyint64;
procedure myint64inc(val:Tmyint64);
begin
if val.lo=high(int64) then
inc(val.hi)
else
inc(val.lo);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
str:string;
begin
myint64.lo:=1234567;//测试
myint64.hi:=4567788;
myint64inc(myint64);
str:=inttostr(myint64.hi)+inttostr(myint64.lo);
showmessage(str);
end;