Table of Contents

# $EPIC: getserial.txt,v 1.2 2007/02/19 03:20:46 jnelson Exp $

Synopsis:

$getserial(HOOK + number) $getserial(HOOK - number)

Description:

This function allows you to retrieve a serial number that is guaranteed not to be in use. At the time of this writing, the only serial number type that is supported is for on hooks, although more types are expected in the future.

The first form returns the first serial number that is later than number that is not in use by any on hook of any type, whatsoever. It is absolutely guaranteed at the time you call getserial that you can use this serial number with no interference to or from any other script that also uses getserial.

The second form returns the first serial number that is smaller than number that is not in use by any on hook of any type, whatsoever.

The number value is optional; the default value of number is 0.

This feature is closely related to the ability to specify a bare + or - as the serial number in an on.

History:

This function was written by wd and first appeared in EPIC4-1.1.8.