portable random function: can someone explain it?

This is a discussion on portable random function: can someone explain it? within the C Programming forums, part of the General Programming Boards category; Originally Posted by laserlight I'd say that it is not guaranteed to work. As far as I can tell, time_t ...

  1. #16
    not-a-geek
    Join Date
    Apr 2004
    Posts
    210
    Quote Originally Posted by laserlight View Post
    I'd say that it is not guaranteed to work. As far as I can tell, time_t is permitted to be of a floating point type, but bitwise and requires that both operands be of integer types.
    True, I believe the only constraint on time_t is that it has to be an "arithmetic type". An example for the use of a floating point based time_t would be the SAS/C environment, used on IBM mainframes.

  2. #17
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Isn't an integer underflow, as this uses, undefined behaviour as well? I'm not completely sure here...

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  4. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 12:03 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21