Using Keywords
Return to Introduction  Previous page  Next page
Team Coherence provides several keyword macros that can be placed in your files. These keywords will be expanded when files are checked in. This useful feature can help document your code and also provides useful information.

Note that keyword expansion will only be applied to files with the extensions recorded in the File Groups dialog box.

The main keyword you can use is $Log:. This keyword provides a method of documenting your code. It will be expanded to include commented Revision and Version information in the file.

Other keywords that can be used are :

·$Revision:$ - is expanded to contain the revision number  
·$Version:$ - is expanded to contain the version label  
·$Author:$ - is expanded to contain the name of person checking in the revision.  
·$RevDate:$ - is expanded to contain the date of the revision  
·$RevComments:$ - is expanded to contain the revision comments.  
·$ModDate:$ - is expanded to contain the date the file was modified.  
·$ProjectName:$ - is expanded to contain the name of the project  
·$NoExpand$ - no keywords will be expanded beyond this point for this file  

If you have defined a Prefix (see Options/Other) this will be inserted in front of the text that is used in the expansion.

For example, if your prefix is '=', and you are expanding $Revision:$, the result will be:

   $Revision:=1.0$

Without the prefix, it would be:

   $Revision:1.0$

 


© 1995-2018 MCN Software