Mode: Configuration Mode


ranged is only valid for numeric and string types.

For numerical types, it limits the valid range of input values. Both boundaries need to be explicitly specified and the limits are inclusive.

For string types, it limits the length of the string.

An added benefit is that it automatically prompts the user the valid range in its help message.


        object newbie {
            help "Newbie section";

            object number-letter {
                help "Test input types";
                attribute number {
                    help "Test number with ranged statement";
                    type ranged int 1 .. 511;


        user@router# set newbie number-letter number ?
        Possible completions:
          <number>     Test number with ranged statement (1..511)
        user@router# set newbie number-letter number 6

        user@router# show
        version "8.1I0 [user]";
        newbie {
            number-letter {
                number 6;
        user@router# set newbie number-letter number 1000   
               value 1000 is not within range (1..511) at '1000'


See also:

Reference (to programmers guide/style guide):

2007-2008 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are trademarks of Juniper Networks, Inc.
Generated on Sun May 30 20:23:12 2010 for DDL Reference Guide by doxygen 1.4.5