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 Variables Overview
- append
- mvar
- var
- EX Series
- SLAX Variables Overview
- append
- mvar
- var
- J Series
- append
- mvar
- M Series
- SLAX Variables Overview
- append
- mvar
- var
- MX Series
- SLAX Variables Overview
- append
- mvar
- var
- PTX Series
- SLAX Variables Overview
- var
- SRX Series
- SLAX Variables Overview
- append
- mvar
- var
- T Series
- SLAX Variables Overview
- append
- mvar
- var
set
Syntax
set $name = value;
Release Information
Statement introduced in version 1.1 of the SLAX language, which is supported in Junos OS Release 12.2 and later releases.
Description
Assign a value to a mutable variable. The variable must be defined using the mvar statement.
Attributes
name | — | Name of the mutable variable. |
value | — | Value to assign to the mutable variable. |
SLAX Example
The following example creates the mutable variable, block. The set statement assigns an initial value to the block variable. In the for loop, the code iterates over each item in the specified list and appends an <item> element with two child elements, <name> and <size>, to the node set stored in the block variable.
mvar $block;
set $block = <block> "item list";
for $item (list) {
append $block += <item> {
<name> $item/name;
<size> $item/size;
}
}
Related Documentation
- ACX Series
- SLAX Variables Overview
- append
- mvar
- var
- EX Series
- SLAX Variables Overview
- append
- mvar
- var
- J Series
- append
- mvar
- M Series
- SLAX Variables Overview
- append
- mvar
- var
- MX Series
- SLAX Variables Overview
- append
- mvar
- var
- PTX Series
- SLAX Variables Overview
- var
- SRX Series
- SLAX Variables Overview
- append
- mvar
- var
- T Series
- SLAX Variables Overview
- append
- mvar
- var