comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Creem <jeff@thecreems.com>
Subject: Re: function Clock return Time; Time is a number, a string...?
Date: Wed, 07 Nov 2007 00:15:06 GMT
Date: 2007-11-07T00:15:06+00:00	[thread overview]
Message-ID: <s2a705-l5t.ln1@newserver.thecreems.com> (raw)
In-Reply-To: <1194388351.937058.41110@k79g2000hse.googlegroups.com>

j.khaldi@oltrelinux.com wrote:
> In "package Ada.Calendar"..
> function Clock return Time; // what is the type of Time here?
> A string? A number? Something else?
> "Time" has been declarated "private", this means it is untyped yet;
> In other words, if I had to call the the function Year with the
> argument Date, how should I do:
> Date := The_Date; // for example: 11 dicember 2004
> GetYear := Year(Date);
> Thanks!
> 
> Jilani
> 

It is private and you don't get to know and any code you write that 
attempts to guess will almost certainly break. If you need to do what 
you are asking you need to use the other subprograms in calendar to 
build a time value based on non private items.

In your case

date := Ada.Calendar.Time_Of(year => 2004, Month => 12, Day => 11);






  parent reply	other threads:[~2007-11-07  0:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-06 22:32 function Clock return Time; Time is a number, a string...? j.khaldi
2007-11-06 23:21 ` anon
2007-11-07  0:15 ` Jeffrey Creem [this message]
2007-11-07 10:49 ` Georg Bauhaus
2007-11-07 10:56   ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox