Annotation of 43BSDReno/lib/libc/stdlib/rand.3, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1990 The Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted
                      5: .\" provided that: (1) source distributions retain this entire copyright
                      6: .\" notice and comment, and (2) distributions including binaries display
                      7: .\" the following acknowledgement:  ``This product includes software
                      8: .\" developed by the University of California, Berkeley and its contributors''
                      9: .\" in the documentation or other materials provided with the distribution
                     10: .\" and in all advertising materials mentioning features or use of this
                     11: .\" software. Neither the name of the University nor the names of its
                     12: .\" contributors may be used to endorse or promote products derived
                     13: .\" from this software without specific prior written permission.
                     14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     15: .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     16: .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     17: .\"
                     18: .\"    @(#)rand.3      6.5 (Berkeley) 5/15/90
                     19: .\"
                     20: .TH RAND 3 "May 15, 1990"
                     21: .AT 3
                     22: .SH NAME
                     23: rand, srand \- bad random number generator
                     24: .SH SYNOPSIS
                     25: .nf
                     26: .ft B
                     27: void
                     28: srand(seed)
                     29: unsigned int seed;
                     30: 
                     31: rand()
                     32: .fi
                     33: .SH DESCRIPTION
                     34: .ft B
                     35: These interfaces are obsoleted by random(3).
                     36: .ft R
                     37: .PP
                     38: The
                     39: .I rand
                     40: function computes a sequence of pseudo-random integers in the range
                     41: of 0 to
                     42: .I RAND_MAX
                     43: (as defined by the header file <stdlib.h>).
                     44: .PP
                     45: The
                     46: .I srand
                     47: function sets its argument as the seed for a new sequence of
                     48: pseudo-random numbers to be returned by
                     49: .IR rand .
                     50: These sequences are repeatable by calling
                     51: .I srand
                     52: with the same seed value.
                     53: .PP
                     54: If no seed value is provided, the functions are automatically
                     55: seeded with a value of 1.
                     56: .SH STANDARDS
                     57: .B Rand
                     58: and
                     59: .B srand
                     60: conform to ANSI X3.159-1989 (``ANSI C'').
                     61: .SH "SEE ALSO"
                     62: random(3)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.