home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 287.lha / Incr_v1.01 / incr.doc < prev    next >
Encoding:
Text File  |  1989-09-13  |  3.9 KB  |  92 lines

  1.  
  2.        Program:  incr
  3.     Programmer:  George Kerber
  4.        Written:  07/24/89 - 07/29/89
  5.        Version:  1.01
  6.    Application:  AmigaDOS
  7.        Purpose:  This utility increment the value in a specified file by
  8.                  one or create the file and save an initial value of 0 if
  9.                  the file does not exist.  incr will also display the
  10.                  stored value un-incremented or before/after.
  11.  
  12.   Requirements:  AmigaDOS 1.3.
  13.          
  14.         SYNTAX:  incr [[-a|-b|-d] TIMERNAME [NOLINE]]
  15.  
  16.                           With no option, a help screen will be displayed.
  17.                      -a   The stored value will be displayed after
  18.                           it has been incremented.
  19.                      -b   The stored value will be displayed before
  20.                           incrementation.
  21.                      -d   The stored value will be displayed, the value
  22.                           will not be incremented.
  23.                  NOLINE   A newline will not be output after the elapsed 
  24.                           time is displayed.
  25.  
  26.   Installation:  Simply copy incr to your c: directory.  Or execute
  27.                  the install script called incr.install.
  28.  
  29.                            execute incr.install
  30.  
  31.     Directions:  Execute incr with a filename.  If this filename doesn't
  32.                  exist, incr will create the file and place a 0 in the file.
  33.                  If the filename exists and contains a numeric value, the
  34.                  value will be incremented and written back to the file.
  35.  
  36.                  CAUTION:  incr does not check if the file you give is a text
  37.                            or executable file.  incr will simply read the first
  38.                            line of the file, convert the data to a numeric
  39.                            value and write the new value to the same file.
  40.                            What this really means is that if you specify
  41.                            a file you don't want changed, too bad....
  42.                  
  43.                  If you use the -d option, the value will simply be displayed
  44.                  and the file will remain unchanged.  Using either the 
  45.                  -a (after) or the -b (before) option will display the value
  46.                  either before or after it has been incremented.
  47.  
  48.                  If the NOLINE option is used, a newline will not be
  49.                  performed after the value is displayed.  This option
  50.                  works the same as the NOLINE option for the AmigaDOS echo
  51.                  command
  52.       
  53.       Examples:  So what good is it?
  54.  
  55.                  Try adding these lines to your startup-sequence.
  56.                  
  57.                  ....
  58.                  echo " You have booted from this disk " NOLINE
  59.                  incr -a s:bootcount NOLINE
  60.                  echo " times before.
  61.                  ....
  62.       
  63.  
  64.                  If you execute anything from a batch file, you can keep
  65.                  track of the number of times you have executed the file.
  66.  
  67.                  -----------------------------------------------------------
  68.  
  69.                  What if you want a batch file to execute something every
  70.                  20 times you run it?  Use the s:bootcount file you created
  71.                  in the last example.
  72.  
  73.                  ....
  74.                  eval <s:bootcount >nil: to env:bootcount value2 20 op mod ?
  75.                  if $bootcount eq 0 VAL
  76.                     ....
  77.                     echo "it's time to do whatever you want done every"
  78.                     echo "twenty times this disk is booted up"
  79.                     ....
  80.                     endif
  81.  
  82.                  -----------------------------------------------------------
  83.                   
  84.                  Get the idea.....
  85.  
  86.  
  87.         Status:  This is public domain, but please keep me as author and
  88.                  keep all the documentation intact.  Anyway, if something
  89.                  is wrong with this program, I'm not responsible.....
  90.  
  91.  
  92.