type numerical

Syntax:

                  type sbyte
                  type ubyte
                  type short
                  type ushort
                  type int
                  type sint
                  type uint
                  type int64
                  type sint64
                  type uint64
                  type sfloat
                  type ufloat

Mode: Configuration Mode

Description:

The following table summarizes the numerical types available

        Table 1. DDL Numerical Types
        Size     DDL Type  Range of Values (inclusive)	 C Type
		 Name					 Equivalent

	8-bit    sbyte     -128 to 127 (-2^7 to 2^7 - 1) signed char
	signed

	8-bit	 ubyte	   0 to 255 (0 to 2^8 - 1)	 unsigned char
	unsigned

	16-bit	 short	   -32768 to 32767		 short
	signed		   (-2^15 to 2^15 - 1)

	16-bit	 ushort	   0 to 65535 (0 to 2^16 - 1)	 unsigned short
	unsigned

	32-bit	 int	   -2147483648 to 2147483647	 long
	signed		   (-2^31 to 2^31 - 1)

	32-bit	 sint	   -2147483648 to 2147483647	 signed long
	signed		   (-2^31 to 2^31 - 1)

	32-bit	 uint	   0 to 4294967295		 unsigned long
	unsigned	   (0 to 2^32 - 1)

	64-bit	 int64	   -2^63 to 2^63 - 1		 long long
	signed

	64-bit	 sint64	   -2^63 to 2^63 -1		 signed long long
	signed

	64-bit	 uint64	   0 to 2^64 - 1		 unsigned long long
	unsigned

	sfloat					 	 signed float

	ufloat					 	 unsigned float

These are the built-in numerical types for objects or attributes in DDL. Further constraints can be imposed on these types to limit the range of the values valid for the object or attribute.

Example:

        attribute interval {
            help "Test ushort";
            type ushort;
        }

Display:

        user@router# set newbie interval ?
        Possible completions:
          <interval>           Test ushort

        [edit]
        user@router# set newbie interval 65536
                                          ^
        value 65536 is not within range (0..65535) at '65536'

        [edit]

See also:
subsection reference 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:13 2010 for DDL Reference Guide by doxygen 1.4.5