Optional Parameter

I want to pass a optiponal paramenter in a function as date.
princemaheshAsked:
Who is Participating?
 
MotazConnect With a Mentor Commented:
function Add(X: Integer; ADate: TDateTime = 0): Integer;
begin
  ShowMessage(IntToStr(X));
  ShowMessage(DateToStr(ADate));
  Result:= Trunc(ADate);
end;
0
 
DelFreakCommented:
Listening...
0
 
princemaheshAuthor Commented:
Thanks,

I was tring to set default value to Null instead of '0'.
0
All Courses

From novice to tech pro — start learning today.