;+ ; NAME: ; CMUNIQUE_ID ; ; AUTHOR: ; Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770 ; craigm@lheamail.gsfc.nasa.gov ; ; PURPOSE: ; Return a unique ID string ; ; CALLING SEQUENCE: ; ID = CMUNIQUE_ID([STRINGVAL]) ; ; DESCRIPTION: ; ; CMUNIQUE_ID returns a "unique" 8 character identifier. ; Programmers can use this routine to derive unique strings which ; can be used to write files, etc. ; ; Identifiers are "unique" in the sense that it is unlikely that two ; identifiers in a given IDL session will coincide. Thus the ; identifier is useful for constructing temporary filenames and ; other hash values. User routines are encouraged to append other ; identifying information to this string, such as a session id, a ; hostname, or a process id number. ; ; The identifier is computed from various sources of random ; information. Users may supply additional information to be ; scrambled into the identifier by passing the FODDER parameter. ; CMUNIQUE_ID will return a different identifier upon each call, ; with or without the FODDER keyword. It maintains an internal ; sequence counter, and and also scrambles in the system time. ; These practices should ensure that successive identifiers are ; different from one another. ; ; INPUTS: ; ; FODDER - Any scalar string value. These values are used to ; additionally scramble the identifier. ; ; KEYWORDS: ; ; NONE ; ; RETURNS: ; The 8-character identifier string. ; ; EXAMPLE: ; ; Print two distinct identifiers. ; IDL> print, cmunique_id(), ' ', cmunique_id() ; 29C47600 79061C57 ; ; SEE ALSO: ; ; NONE ; ; MODIFICATION HISTORY: ; Written, CM, 11 Jan 2001 ; ; $Id: cmunique_id.pro,v 1.2 2001/01/13 04:08:30 craigm Exp $ ; ;- ; Copyright (C) 2001, Craig Markwardt ; This software is provided as is without any warranty whatsoever. ; Permission to use, copy, modify, and distribute modified or ; unmodified copies is granted, provided this copyright and disclaimer ; are included unchanged. ;-