Chapter 9 Generation Reference Guide (GTL)


delete macro

The .delete macro deletes all occurrences of a string in a text block. In the following script, it deletes the string <del-string> in its block content.

.delete '('<del-string> ')'
<delete-block-input>
.enddelete

This macro is particularly useful when you work with naming conventions.

For more information about naming conventions, see "Defining naming conventions" in the "Managing Models" chapter in the General Features Guide.

Parameters

Parameter Type Description
<del-string> Text String to be deleted in the input block
<delete-block-input> Complex template Parameter used to input text

Output

The output is that all instances of the string <del-string> are removed in the delete block input.

In the following example, 'GetCustomerName' is converted to 'CustomerName'.

.delete( get )
GetCustomerName
.enddelete

In the following example, the variable %Code% is 'm_myMember' and it is converted to 'myMember'.

.delete(m_)
%Code%
.enddelete

 


Copyright (C) 2005. Sybase Inc. All rights reserved.