@@IFSTRCMP

Command

The @@IFSTRCMP command compares a macro input parameter to a string. If the input parameters match, the macro statements following the command are processed. Otherwise, the statements following @@ELSE are processed.

Syntax

@@IFSTRCMP( @@x , token ) statement @@ELSE... [statement]
@@ENDIF

@@xA variable representing a macro argument
tokenA string to be compared to the macro argument
statementOperations to be performed depending on the results of the test

Notes

The @@IFSTRCMP statement block must use the @@ELSE statement as part of its decision syntax. You do not have to include a statement after @@ELSE.

Example

@@IFSTRCMP (@@2, @_NULL) 
  @@1 
@@ELSE  
  (@@1 + @@2)
@@ENDIF

This test checks to see if the second macro argument is blank. If it is, then only the first argument is used. If the second argument is not blank, then the two arguments are added.

See Also

@@ELSE
@@ENDIF


Copyright 1991-2002 Hyperion Solutions Corporation. All rights reserved.