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 if
- for-each
- if
- EX Series
- SLAX Statements Overview
- else if
- for-each
- if
- M Series
- SLAX Statements Overview
- else if
- for-each
- if
- MX Series
- SLAX Statements Overview
- else if
- for-each
- if
- PTX Series
- SLAX Statements Overview
- else if
- for-each
- if
- SRX Series
- SLAX Statements Overview
- else if
- for-each
- if
- T Series
- SLAX Statements Overview
- else if
- for-each
- if
else
Syntax
if (expression) {
/* code */
}
else {
/* code */
}Release Information
Statement introduced in version 1.0 of the SLAX language.
Description
Include a default set of instructions that are processed if the preceding if and else if statements evaluate to FALSE.
SLAX Example
if (starts-with(name, "fe-")) {
if (mtu < 1500) {
/* Select the Fast Ethernet interfaces with low MTUs */
}
}
else {
if (mtu > 8096) {
/* Select the non-Fast Ethernet interfaces with high MTUs */
}
}XSLT Equivalent
<xsl:choose>
<xsl:when select="starts-with(name, 'fe-')">
<xsl:if test="mtu < 1500">
<!-- Select with Fast Ethernet interfaces with low MTUs -->
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="mtu > 8096">
<!-- Select the non-Fast Ethernet interfaces with high MTUs -->
</xsl:if>
</xsl:otherwise>
</xsl:choose>
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 if
- for-each
- if
- EX Series
- SLAX Statements Overview
- else if
- for-each
- if
- M Series
- SLAX Statements Overview
- else if
- for-each
- if
- MX Series
- SLAX Statements Overview
- else if
- for-each
- if
- PTX Series
- SLAX Statements Overview
- else if
- for-each
- if
- SRX Series
- SLAX Statements Overview
- else if
- for-each
- if
- T Series
- SLAX Statements Overview
- else if
- for-each
- if