EasyManuals Logo
Home>Texas Instruments>Computer Hardware>TMS34010

Texas Instruments TMS34010 Reference Guide

Texas Instruments TMS34010
181 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #136 background imageLoading...
Page #136 background image
Random
Integer
rand/srand
Syntax
#include
<stdlib.h>
int
rand()
void
srand(seed)
unsigned
int
seed;
Defined
in
rand.
c in
rts.
src
Description
Two
functions
work
together
to
provide pseudo-random sequence gener-
ation:
The
rand
function returns pseudo-random integers in the range
Q-RAN
D-MAX.
The
srand
function sets the value
of
seed
so that a subsequent call
to
the rand function produces a
new
sequence
of
pseudo~random
numbers. The srand
function
does
not
return a value.
If
you call rand before calling srand, rand generates the same sequence
it
would
produce
if
you first called srand
with
a seed value
of
1. If you call
srand
with
the same seed value, rand generates the same sequence
of
numbers.
6-61

Table of Contents

Other manuals for Texas Instruments TMS34010

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS34010 and is the answer not in the manual?

Texas Instruments TMS34010 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS34010
CategoryComputer Hardware
LanguageEnglish

Related product manuals