解决方案 »
- 使用copyfile的一个小问题
- 在DBGRID中的同一CELL中事件ONCELLCLICK不更新PICKLIST问题
- 如何更好地在程序里控制OFFICE文档,OFFICE文档容器插件V1.3
- !!!!!!!!!!!!!为什么我没办法使用copyfile函数呀!!!!!!!!!!!!!!
- 我有D7设计ActiveX组件,为什么只能编译一次?
- 用TDBGridEh表格控件时,怎样得到单元格的坐标?
- 怎样用delphi 点击 webbrowser里flash的一个按钮?
- 简单问题问问!(在线等!)
- ==关于TFileStream和动态数组的问题?也许不容易===
- 到现在我一直不太了解tdatabase和tstoredproc ?
- 自定义类型,指针访问的一个疑问
- 函数参数错误求助
vCount:= 0;
while i > 0 do
begin
I := I + 1 - 2;
vCount := vCount + 1;
end;
vCount 就是天数
procedure TForm1.Button2Click(Sender: TObject);
var
i:Integer;
m:Integer;
begin
i:=12;
m:=0;
while i>0 do
begin
i:=i-2;
i:=i+1;
m:=m+1;
end;
self.Label3.Caption:=IntToStr(m);
end;
function TForm1.AAA : Integer;
var
TotalCount : Integer;
Day : Integer;
begin
TotalCount := 12;
Day := 0;
repeat
Inc(Day);
TotalCount := TotalCount + 1;
until TotalCount <2;
result := Day;
end;
嘿嘿,2147483636,不知对否。
function TForm1.AAA : Integer;
var
TotalCount : Integer;
Day : Integer;
begin
TotalCount := 12;
Day := 0;
repeat
Inc(Day);
TotalCount := TotalCount - 1;
until TotalCount <2;
result := Day;
end;
刚才错了,嘿嘿
procedure TForm1.Button1Click(Sender: TObject);
Var
intN:Integer;
intI:Integer;
begin
intN:=12;
intI:=0;
While intN>0 Do
Begin
Inc(intI);
intN:=intN-2+1
End;
ShowMessage(IntToStr(intI-1));
end;//共11天
var
x,day:Integer;
begin
x:=12;
day:=0;
while x>0 do begin
x:=x-2+1;
day:=day+1;
end;
ShowMessage(IntToStr(day));
end;其实就是一天吃一个了