From owner-freebsd-questions Wed Oct 16 08:23:28 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA08452 for questions-outgoing; Wed, 16 Oct 1996 08:23:28 -0700 (PDT) Received: from gatekeeper.barcode.co.il (gatekeeper.barcode.co.il [192.116.93.17]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id IAA08444 for ; Wed, 16 Oct 1996 08:23:23 -0700 (PDT) Received: (from nadav@localhost) by gatekeeper.barcode.co.il (8.7.5/8.6.12) id RAA07168; Wed, 16 Oct 1996 17:20:57 +0200 (IST) Date: Wed, 16 Oct 1996 17:20:57 +0200 (IST) From: Nadav Eiron To: Sean Kelly cc: Gary Kline , FreeBSD Questions Mailgroup Subject: Re: interpretation? In-Reply-To: <326451D7.41C67EA6@fsl.noaa.gov> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 15 Oct 1996, Sean Kelly wrote: > Gary Kline wrote: > > > Can any resident C wizard interpret this parameter definition for me? > > > > > localtime(const time_t * const timep) > > You might want a C++ wizard. > > timep is a constant pointer to a constant time_t object. > > > And, is there a simpler way of saying the same thing? time_t is > > a long int. Thanks for any lucid translation.... > > So long as locatime() promises to not modify the object pointed to by > timep, then locatime(time_t* timep) is simpler. > Yeah, but may not work if you'll try passing a const to it. Borland C++ for one (haven't had much experience with gcc lately) will not let you convert a const * const var to a non-const one. This means that if you already have a variable declared as const time_t x you won't be able to pass its address to a routine that is declared as localtime (time_t * timep) > -- > Sean Kelly > NOAA Forecast Systems Laboratory > Boulder Colorado USA > Nadav