// 080419: 나눗셈 연산 제거
inline bool IsLeapYear(const int &Year)
{
return ((Year % 100 != 0? Year % 4: Year % 400) == 0);
}
function IsLeapYear(Year: Integer): Boolean;
begin
if Year mod 100 <> 0 then
Result := ((Year % 4) = 0);
else
Result := ((Year % 400) = 0);
end;
inline bool IsLeapYear(const int &Year)
{
return ((Year % 100 != 0? Year % 4: Year % 400) == 0);
}
function IsLeapYear(Year: Integer): Boolean;
begin
if Year mod 100 <> 0 then
Result := ((Year % 4) = 0);
else
Result := ((Year % 400) = 0);
end;
'Windows > RAD Studio' 카테고리의 다른 글
사업자등록번호 검증 (C++) (0) | 2008.01.05 |
---|---|
주민등록번호 검증 (Delphi) (0) | 2008.01.02 |
[RAD] GExpert - Debug 창 이용하기 (0) | 2007.10.01 |
[JS] ScrollObject (0) | 2007.09.21 |
[DEL] Mutex 를 이용한 실행중복 방지 (0) | 2007.09.21 |