Re: date() should not append a final "\n" ?!?

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: date() should not append a final "\n" ?!?
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Fri 20 Aug 1999 - 03:05:23 EST


Message-ID: <x2aernsnu4.fsf@blueberry.kubism.ku.dk>

Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:

> Suggestion:
>
> return strtok(ctime(&t), "\n");

s<-ctime(&t); s[25] = '\0'; return s;

This won't work if s is read-only (which I don't think it is), but
neither will strtok since it pokes a null in the same spot....

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:07 EST