摘要: 函数实现(code)function DaysInAMonth(const AYear,AMonth:Word):Word;begin Result:=MonthDays[IsLeapYear(Ayear)][AMonth];end;函数调用varaa:word;begin aa:=DaysInAMonth(2009,12); //aa的值为31end;判断是否为润年functionIsLeapY... 阅读全文
posted @ 2009-12-01 22:53 我心飛揚 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 1.Date  功能说明:返回当前的日期。  参考实例:  procedure TForm1.Button1Click(Sender: TObject);  begin    Label1.Caption := '今天是:' + DateToStr(Date);  end;  Label显示为:今天是2005年1月1日。 2.DateToStr  功能说明:将日期型转换为字符型。  参考实例:  ... 阅读全文
posted @ 2009-12-01 22:42 我心飛揚 阅读(1089) 评论(0) 推荐(0) 编辑
摘要: 表示关闭的有hideclosefreereleasedestroyterminatefreeandnil()haltfree:先判断不为空再destroy。释放对象,对于窗体来说,只会释放对象,而不将窗体对象的指针指向nil,所以free后用assigned函数来判断还是返回true.只有freeandnil或free后再将指针指向nil.destroy:不判断直接释放。如果对象已经释放的话会报错... 阅读全文
posted @ 2009-12-01 15:30 我心飛揚 阅读(437) 评论(0) 推荐(0) 编辑