@@ENDIF

The @@ENDIF command marks the end of an @@IFSTRCMP command sequence. The @@ENDIF command can be used only in conjunction with the @@IFSTRCMP statement.

Syntax

@@ENDIF

Notes

  • You must supply an @@ENDIF statement for every @@IFSTRCMP statement in your macro. If you do not supply the required @@ENDIF statements, your formula or calculation script does not verify.

  • If you are using an IF statement nested within another IF statement, end each IF with an ENDIF, as in the following example:

    @@IFSTRCMP (@@1, SKIPNONE) 
      @_JAVGS (0, @@2) 
    @@ELSE 
      @@IFSTRCMP (@@1, SKIPMISSING) 
        @_JAVGS (1, @@2) 
      @@ELSE 
        @@IFSTRCMP (@@1, SKIPZERO) 
          @_JAVGS (2, @@2) 
        @@ELSE 
          @@IFSTRCMP (@@1, SKIPBOTH) 
            @_JAVGS (3, @@2) 
          @@ELSE 
            @@ERROR (@@L1, @_INVALIDSKIP) 
          @@ENDIF 
        @@ENDIF 
      @@ENDIF 
    @@ENDIF
  • All @@IFSTRCMP statements must be ended with @@ENDIF statements.

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