>  Docs Center  >  Libraries  >  Markwardt  >  CMUNIQUE_ID
Libraries

CMUNIQUE_ID

CMUNIQUE_ID

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



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us