Copyright Digital Equipment Corp. All rights reserved.

Example

   CMS> ANNOTATE TIMECVT.BAS/GENERATION=3
   %CMS-S-ANNOTATED, element DISKX:[WORK.CMSLIB]TIMECVT.BAS annotated

     This command produces a file named TIMECVT.ANN, which contains
     the annotated listing of generation 3 of TIMECVT.BAS. The
     contents of TIMECVT.ANN are as follows:

Annotated listing for element TIMECVT.BAS in CMS Library 
DISKX:[WORK.CMSLIB]  25-APR-1988 15:50:29

 4    15-APR-1988 10:01:55 JAMES "additional error checks"
*3    12-APR-1988 15:49:01 JAMES "add check for invalid delta time"
*2    27-MAR-1988 12:39:58 JAMES "jp - fixed length string required"
*1    25-MAR-1988 15:37:11 JAMES "time conversion program"

Annotated listing for element TIMECVT.BAS in CMS Library 
DISKX:[WORK.CMSLIB]  25-APR-1988 15:50:29

         1       10      rem Program to compute an absolute time given the 
present time
         2               rem and a delta time. The result is written to a file.
         3
         4       20      OPTION TYPE = EXPLICIT
         5               DECLARE STRING DELTA_TIME
 2       6               MAP (STRING_LEN) STRING ASC_TIME = 80
         7               DECLARE LONG RETCODE
         8               DIM LONG BINARY_DELTA(1)
         9               DIM LONG NOW(1)
         10              DIM LONG BINARY_CVT_TIME(1)
         11
         12      100     EXTERNAL LONG CONSTANT SS$_NORMAL
 3       13              EXTERNAL LONG CONSTANT SS$_IVTIME
         14              EXTERNAL LONG FUNCTION LIB$ADDX
         15              EXTERNAL LONG FUNCTION LIB$SUBX
         16              EXTERNAL LONG FUNCTION LIB$INT_OVER
         17              EXTERNAL INTEGER FUNCTION SYS$BINTIM (STRING 
BY DESC, LONG BY REF)
         18              EXTERNAL INTEGER FUNCTION SYS$GETTIM (LONG 
BY REF)
         19              EXTERNAL INTEGER FUNCTION SYS$ASCTIM (LONG 
BY REF, STRING BY DESC, &
         20                                              LONG BY REF, 
LONG BY REF)
         21      150     LET RETCODE = LIB$INT_OVER(0)
         22              PRINT "Input delta time"
         23              INPUT DELTA_TIME
         24              LET RETCODE = SYS$BINTIM ( DELTA_TIME, 
BINARY_DELTA(0) )
 3       25      175     IF (RETCODE = SS$_NORMAL) THEN GOTO 200
 3       26              ELSE IF RETCODE = SS$_IVTIME THEN     &
 3       27                   PRINT ,"INVALID TIME"
 3       28                   GOTO DONE
 3       29                   END IF
 3       30              END IF
 3       31      200     LET retcode = SYS$GETTIM(NOW(0))
 3       32              IF (VAL( DELTA_TIME ) > 0 ) THEN      &
         33              retcode=LIB$ADDX(NOW(0),BINARY_DELTA (0) ,
BINARY_CVT_TIME(0))
         34              END IF
         35              LET retcode = SYS$ASCTIM(,ASC_TIME,BINARY_
CVT_TIME(0),)
         36              OPEN "TIME.TMP" FOR OUTPUT AS FILE #1
         37              PRINT #1,ASC_TIME
         38              CLOSE #1
         39      32767   Done:  END
         40

     The element's history appears at the beginning of the
     file TIMECVT.ANN. The history lists the records of the
     transactions that created each of the four generations.
     However, because the third generation was annotated (ANNOTATE
     TIMECVT.BAS/GENERATION=3), changes made after generation 3
     are not shown in the annotated listing. Generation 3 and its
     ancestors are marked with an asterisk in the history.

     The source file listing shows each line of the file, including
     line numbers. The numbers farthest to the left are the
     generation numbers in which the line was most recently inserted
     or modified; the lines with no generation numbers have not
     changed since generation 1. The next column of numbers is
     assigned by CMS. The third column of numbers is included in
     the program itself.