When a macro is referenced, the value can be modified through the use of macro modifiers. To modify a macro, reference it as follows:
$(name,modifier[,modifier ...])
name is expanded, and each modifier is applied in order to the elements of the value.
Table 24 lists macro modifiers and the actions they perform.
Modifier | Action |
---|---|
number | Selects the numberth element of the value. |
>string | Appends string to each element. |
<string | Prepends string to each element. |
from=to | Substitutes occurrences of from with to. If from does not appear in an element, the element is not changed. |
*F or * | Each element is a wildcard spec evaluating to a list of files. |
*D | Each element is a wildcard spec evaluating to a list of directories. |
@ | Includes element as a text file. |
@/from/to/ | Includes lines in text file, matching lines with regex from and replacing the matched part of the line with regex to. |
A/ | Converts element to an absolute file name using path separator /. |
A\ | Converts element to an absolute file name using path separator \. |
A | Converts element to an absolute file name using the default path separator \. |
B | Selects the base part of the element. |
D | Selects the directory part of the element. |
E | Selects the extension part of the element. |
F | Selects the file part of the element. |
LC | Converts the element to lowercase. |
Mregex | Chooses elements that match regular expression regex. |
M"spec" | Chooses elements that match file specification spec. |
Nregex | Chooses elements that do not match regular expression regex. |
N"spec" | Chooses elements that do not match file specification spec. |
P | Selects the path part of the element. |
R | Selects the root part of the element |
S/from/to/ | Substitutes from (a regular expression) to to. If from does not match an element, the element is not changed |
UC | Converts the element to uppercase. |
Wstr | Replaces white space between macro elements with str. |
X | Replaces element names with pathnames using the search directories. |
Z | Selects the drive part of the element. |
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |