Pathfinder Applications
Note: † Internal applications are hidden from customers and partners. This is visible to you because you have logged into HPEs internal network.
Navigation
Table of Contents
Guide That Contains This Content
[+] Expand All
[-] Collapse All
Related Documentation
- ACX Series
- SLAX Statements Overview
- else
- for-each
- if
- EX Series
- SLAX Statements Overview
- else
- for-each
- if
- M Series
- SLAX Statements Overview
- else
- for-each
- if
- MX Series
- SLAX Statements Overview
- else
- for-each
- if
- PTX Series
- SLAX Statements Overview
- else
- for-each
- if
- SRX Series
- SLAX Statements Overview
- else
- for-each
- if
- T Series
- SLAX Statements Overview
- else
- for-each
- if
else if
Syntax
if (expression) {
/* code */
}
else if (expression) {
/* code */
}Release Information
Statement introduced in version 1.0 of the SLAX language.
Description
Include instructions that are processed if the expression defined in the preceding if statement evaluates to FALSE and the expression defined in the else if statement evaluates to TRUE. Multiple else if statements can be included, but the processor only executes the instructions contained in the first else if statement whose expression evaluates to TRUE. All subsequent else if statements are ignored.
SLAX Example
var $description2 = {
if (description) {
expr description;
}
else if (../description) {
expr ../description;
}
else {
expr "no description found";
}
}XSLT Equivalent
<xsl:variable name="description2">
<xsl:choose>
<xsl:when test="description">
<xsl:value-of select="description"/>
</xsl:when>
<xsl:when test="../description">
<xsl:value-of select="../description"/>
</xsl:when>
<xsl:otherwise>unknown</xsl:otherwise>
</xsl:choose>
</xsl:variable>Usage Examples
See Example: Configuring Dual Routing Engines and Example: Automatically Configuring Logical Interfaces and IP Addresses.
Related Documentation
- ACX Series
- SLAX Statements Overview
- else
- for-each
- if
- EX Series
- SLAX Statements Overview
- else
- for-each
- if
- M Series
- SLAX Statements Overview
- else
- for-each
- if
- MX Series
- SLAX Statements Overview
- else
- for-each
- if
- PTX Series
- SLAX Statements Overview
- else
- for-each
- if
- SRX Series
- SLAX Statements Overview
- else
- for-each
- if
- T Series
- SLAX Statements Overview
- else
- for-each
- if