Advanced Topic: Variable Substitutions

Variables are inserted into your source like this.

 My name is $(
 This document last produced on $(

Variable Types

Three types of variables can be used in Doco.

  1. Java system properties
  2. Standard Doco variables
  3. User defined variables

Java Variables

Here are the Java variables you can use..

PropertyMeaningValue during this build
file.separatorFile separator/
java.class.pathJava classpath(too long to show here)
java.class.versionJava class version number48.0
java.homeJava installation directory/usr/java/j2sdk1.4.2_03/jre
java.vendorJava vendor-specific stringSun Microsystems Inc.
java.vendor.urlJava vendor URL
java.versionJava version number1.4.2_03
line.separatorLine separator(a control character)
os.archOperating system architecturei386
os.nameOperating system nameLinux
os.versionOperating system version2.4.22-1.2174.nptlsmp
path.separatorPath separator (for example, ":"):
user.dirUser's current working directory/home/jd/sourceforge/acmejava-doco/dist
user.homeUser home directory/home/jd
user.nameUser account namejd

Standard Doco Variables

VariableMeaningValue during this buildAssignation
doco.datetoString of a new Date objectTue Jun 01 14:22:50 BST 2004Dynamic
doco.versionThe version of Doco used0.8From
doco.authorThe author of DocoJames Dodd (
doco.document.versionThe version of the document (if versioned)0.8Dynamic
doco.document.printableThe name of the printable version of the document (if split into pages)manual_v0.8_full.htmlDynamic

User Defined Variables

These must be placed in your .dpr file and are of the following form.