Solved

Optional Parameter

Posted on 2001-09-03
3
170 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now