From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 100159,805e0071ac25e02c X-Google-Attributes: gid100159,public X-Google-Thread: fc89c,805e0071ac25e02c X-Google-Attributes: gidfc89c,public X-Google-Thread: f6653,805e0071ac25e02c X-Google-Attributes: gidf6653,public X-Google-Thread: fee84,805e0071ac25e02c X-Google-Attributes: gidfee84,public X-Google-Thread: fcda7,805e0071ac25e02c X-Google-Attributes: gidfcda7,public X-Google-Thread: 10650a,805e0071ac25e02c X-Google-Attributes: gid10650a,public X-Google-Thread: 115614,805e0071ac25e02c X-Google-Attributes: gid115614,public X-Google-Thread: 11035d,805e0071ac25e02c X-Google-Attributes: gid11035d,public From: Marc Roussel Subject: Re: best UNIX OS as primary platform for UNIX system software develpoment? Date: 1996/09/13 Message-ID: <32397EFB.167E@henri.chem.uleth.ca>#1/1 X-Deja-AN: 180391957 distribution: inet references: <322E9A9E.264F@uebemc.siemens.de> <322F54A6.44FE@cao.mts.dec.com> content-type: text/plain; charset=us-ascii organization: Department of Chemistry, University of Lethbridge mime-version: 1.0 newsgroups: comp.unix.solaris,comp.sys.sun.misc,comp.sys.hp.hpux,comp.unix.internals,comp.unix.programmer,comp.unix.aix,comp.unix.osf.osf1,comp.sys.sgi.misc x-mailer: Mozilla 2.02 (X11; I; OSF1 V3.2 alpha) Richard Tobin wrote: > In article Dan.Pop@cern.ch (Dan Pop) > writes: > > it [time_t] can be any of the 9 integral types or 3 floating point > > types. > > There might be some trick for portably determining whether it's an > integral or floating type. How about > > (time_t)0.3 == 0 > > Am I right in thinking this expression is always legal and must be > true iff time_t is an integral type? Why would you ever want to do that? You might thereby figure out whether time_t is an integral or floating point type, but you still can't do much directly with time_t values. That's why there are standard library functions for handling them and converting them to and from more useful formats. If you try to use tricks like these, one of three things is likely to happen: 1. Your code is perfectly portable and equally unreadable. 2. Your code should be portable but some compiler and library writers with less legalistic minds than yours have interpreted the standard in a sloppy way so your code isn't really portable. 3. You have overinterpreted the standard and your code only works as intended on a small number of machines. This kind of fun you don't need. Marc R. Roussel (roussel@henri.chem.uleth.ca) Department of Chemistry University of Lethbridge