반응형

delphi 85

[팁] 쓸만한 함수

팁모음집 금주가 몇번째 주인지 어떻게 구합니까 function kcIsLeapYear( nYear: Integer ): Boolean; // 윤년을 계산하는 함수 begin Result := (nYear mod 4 = 0) and ((nYear mod 100 0) or (nYear mod 400 = 0)); end; function kcMonthDays( nMonth, nYear: Integer ): Integer; // 한달에 몇일이 있는지를 계산하는 함수 const DaysPerMonth: array[1..12] of Integer = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); begin Result := DaysPerMonth[nMonth]; if (n..

Programming/Delphi 2010.06.30
반응형