Operators
The following table shows operators that can be used in Configuration Variable definitions and how they are interpreted as a Configuration Variable is expanded. In the examples below, assume that $(USTN_WORKSETCFG) is defined as g:/Clients/DeptOfTransportation/WorkSets/Highway131.cfg
Operator | Syntax | Definition |
---|---|---|
basename | basename(<expression>) | Returns the filename of
<expression> without directory or extension. For example:
WORKSETNAME = basename ($(_USTN_WORKSETCFG)) gives Highway131 |
concat | concat(<arg1>,<arg2>...) | Returns the concatenation of the
arguments, similar to the + operator, but allows multiple arguments. For
example:
LIST = concat (CFG1,CFG2,CFG3) |
devdir | devdir(<expression>) | Returns the device and
directory of
<expression>, including a trailing
directory separator. For example:
WORKSETDIR = devdir ($(_USTN_WORKSETCFG)) gives g:\Clients\DeptOfTransportation\WorkSets\ |
dev | dev(<expression>) | Returns the device (for example,
c:) of
<expression>. For example:
WORKSETDEV = dev ($(_USTN_WORKSETCFG)) gives g: |
dir | dir(<expression>) | Returns the directory (without
the device) of
<expression>. For example:
WORKSETDIR = dir ($(_USTN_WORKSETCFG)) gives \Clients\DeptOfTransportation\WorkSets\ |
ext | ext(<expression>) | Returns the file extension of
<expression>. For example:
WORKSETEXT = ext ($(_USTN_WORKSETCFG)) gives .cfg |
filename | filename(<expression>) | Returns the filename and
extension of <expression>. For example:
WORKSETFILE = filename ($(_USTN_WORKSETCFG)) gives Highway131.cfg |
first | first(<expression>) | Returns the first portion of an
expression (that is, the part preceding the first semicolon). For example:
FIRSTREFDIR = first ($(MS_RFDIR)) |
firstdirpiece | firstdirpiece(<expression>) | Returns the root directory
(without device) of <expression>. For example:
WORKSETROOT = firstdirpiece ($(_USTN_WORKSETCFG)) gives Clients |
lastdirpiece | lastdirpiece(<expression>) | Returns the portion of the
directory closest to the file in <expression>. For example:
WORKSETPAR = lastdirpiece ($(_USTN_WORKSETCFG)) gives WorkSets |
noext | noext(<expression>) | Returns the full path of
<expression>, omitting the extension.
WORKSETFILEROOT = noext ($(_USTN_WORKSETCFG)) gives g:\Clients\DeptOfTransportation\WorkSets\Highway131 |
parentdevdir | parentdevdir(<expression>) | Returns the parent directory,
including the device, of <expression>. For example:
WORKSETPDD = parentdevdir ($(_USTN_WORKSETCFG)) gives g:\Clients\DeptOfTransportation\ |
parentdir | parentdir(<expression>) | Returns the parent directory,
excluding the device, of <expression>
WORKSETPD = parentdir ($(_USTN_WORKSETCFG)) gives \Clients\DeptOfTransportation\ |
registryread | registryread(regvar)
|
Returns the contents of the
registry variable regvar. For example:
PWDIR=registryread("HKEY_CURRENT_USER\SOFTWARE\Bentley\ProjectWise\Path") |