摘要:
一:新建所需测试单元unit UFunction;interfacetypeTMyfun=class(TObject)publicfunction GetMyAge(Birthday:TDateTime):Integer;end;implementationuses SysUtils,DateUtils;{ TMyfun }function TMyfun.GetMyAge(Birthday: TDateTime): Integer;varsyear,smonth,sday:Word;byear,bmoth,bday:Word;beginsyear:=YearOf(Now);//DecodeDa 阅读全文