Solved

Optional Parameter

Posted on 2001-09-03
3
173 Views
Last Modified: 2010-04-06
I want to pass a optiponal paramenter in a function as date.
0
Comment
Question by:princemahesh
3 Comments
 
LVL 7

Accepted Solution

by:
Motaz earned 20 total points
ID: 6452244
function Add(X: Integer; ADate: TDateTime = 0): Integer;
begin
  ShowMessage(IntToStr(X));
  ShowMessage(DateToStr(ADate));
  Result:= Trunc(ADate);
end;
0
 

Expert Comment

by:DelFreak
ID: 6452263
Listening...
0
 

Author Comment

by:princemahesh
ID: 6452267
Thanks,

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

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question