Predefined variables

There are a number of predefined variables which you can use. Some of these variables are Best Guesses which may turn out wrong. In this case it is best to override the default value with one of your own using the define directive.

The standard variables are:

  • __CWD__ This is the current directory when _WEBC_ was started. This can be used to build absolute filenames for inclusion.
  • __DATE__ This is the current date.
  • __TIME__ This is the current time.
  • __MODIFIED__ This is the date of the source file.
  • __SITE__ This is a best guess of the name of this machine. This could be incorrect for a variety of reasons, so check the value on your machine, and if necessary, override this variable.
  • __FILE__ This is the name of the source file being processed.
  • __HTMLFILE__ This is the name of the HTML file being generated.
  • __USER__ This is the user name of the person running webc.
  • __EMAIL__ This is the best guess of the email address for the person running webc. There are a number of reasons that this could be wrong, so check out the value, and override the variable if appropriate.
  • __VERSION__ This gives the current version ID of the webc compiler.
If additional system variables are defined they will always have two leading and trailing underscores.
[Previous] [Introduction] [Overview] [Directives] [Variables] [Functions] [Invocation] [Suggestions] [Examples] [Perl API] [Next]
Source for this file can be found in macros.wc.

[scripts] [Send a comment]

Last modified 23 Oct 1998
Dave Regan

Comments to: PEAK Support Team