- NAME
- randpint - GET RANDOM POSITIVE INTEGER

- SYNOPSIS
- DESCRIPTION
- PARAMETERS

- INPUT
- RETURN

# NAME

randpint.c - random positive integer operations

Version Tag $Id: randpint.c,v 1.16 2006/02/06 19:55:46 db60 Exp $

# randpint - GET RANDOM POSITIVE INTEGER

## SYNOPSIS

        long randpint(long upper);

## DESCRIPTION

Returns a positive integer with a user-specified upper limit.

Before calling `randpint()`, ensure the random number generator has been initialized by calling `rinit()`.

## PARAMETERS

### INPUT

upper

  The random number will be in the range [0..`upper`] inclusive.

### RETURN

A random integer in the interval [0..`upper`].