GET_COUNT Name
GET_COUNT Purpose
Get next count value, from 1 up.
Category
Calling Sequence
c = get_count(tag) Inputs
tag = Any text string (optional). in
Keyword Parameters
Keywords
FILE=file Name of count file to use (def=count_file.txt
in current directory.
/LAST return last count without incrementing.
/ZERO zero counter for given tag. Does not return
a count. Count for next normal call will be 1.
SET=c set counter to given value for given tag. Does not
return a count. Count for next normal call will be c+1.
DIGITS=n Return an n digit string value (0 padded on left).
/ZREF initial count returned starts at 0.
Outputs
c = Count corresponding to given tag. out
Returned as a string.
Common Blocks
Notes
Notes: this routine returns the number of times it has
been called with the given tag. The counts are saved
in a count file which defaults to count_file.txt in
current directory. This is a simple text file and
may be modifed. Useful for creating a series of
related file names. Could use date2dn to generate
a tag value. Use a unique tag for each purpose.
Modification History
R. Sterner, 1995 Jul 6
R. Sterner, 2002 Sep 25 --- Allowed set for new tags. Added DIGITS.
R. Sterner, 2002 Dec 03 --- Was returning unformatted value for new.
R. Sterner, 2002 Dec 03 --- Made tag optional.
R. Sterner, 2003 Jan 06 --- Used file_search for IDL 5.5 on.
R. Sterner, 2003 Mar 20 --- New keyword /LAST.
H. Taylor, 2004 Jun 29 --- New keyword /ZEROREF
Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.