Re: rand and srand



Bill Cunningham wrote:

<about main>

The C99 standard wants and int.

Or a type compatible with int.

[...] So is there really a need to use srand ( ) ?

Yes. If you want your next pseudo-random sequence to be different and
not repeat.

.



Relevant Pages

  • Re: rand and srand
    ... santosh said: ... Or a type compatible with int. ... not repeat. ... The way the OP was using srand, the next pseudo-random sequence will not ...
    (comp.lang.c)
  • RE: Keyboard event handler to ignore repeated key_down, key_up
    ... int MyCallbackFunction ... commonly the repeat count is 1. ... > You can check the repeat count to determine whether a keystroke message ... > The previous key-state flag indicates whether the key that generated the ...
    (microsoft.public.office.developer.com.add_ins)
  • [PATCH] ATI Remote Control improvements
    ... module_param(debug, int, 0444); ... +static int selectiverepeat; ... * FILTER_TIME jiffies between them are considered as repeat ... keyrepeats, don't simulate repeat */ ...
    (Linux-Kernel)
  • Re: average problem
    ... Bill Cunningham wrote: ... Would I need to put sizeof operator in the Sma function? ... double Sma(double *num, int val) ... return res / val; ...
    (comp.lang.c)
  • Re: macros (was: Paul Grahams teaching style is bad}
    ... I just had not known `repeat ... ... main (int argc, char *argv) ... > example, that expands to arbitrarily nested for loops, with the depth ... > depending on the way the user uses the macro. ...
    (comp.lang.lisp)