Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > About Siebel eScript > About Data Types and Numbers > About NumbersThis topic describes the types of numbers that you can use with Siebel eScript. Siebel eScript treats a number that contains a character other than a decimal point as a string. For example, the number 100,000 is a string, including the comma. The exception is hexadecimal numbers and scientific notation. The number types that this topic describes are not data types. You cannot write code that uses one of these number types as a data type in the declaration of a strongly typed variable. For more information, see Using Strongly Typed and Typeless Variables. Integer NumbersAn integer number is a positive whole number, a negative whole number, or zero. Siebel eScript recognizes the following:
You cannot write code that strongly types a variable as an integer. You can write code that uses the float primitive or the value of the float primitive as an integer. For more information, see Using Strongly Typed and Typeless Variables. Hexadecimal NumbersA hexadecimal number is a number that uses base 16 digits. It uses digits from the following sets: The following format precedes a hexadecimal number: A hexadecimal number is not case-sensitive in Siebel eScript. Table 5 lists example hexadecimal numbers and their decimal equivalents. Octal NumbersAn octal number is a number that uses base 8 digits. It includes digits from the following set: A zero precedes an octal number. Table 6 lists example octal numbers and their decimal equivalents. Floating Point NumbersA floating-point number is a number that includes a whole part and a fractional part. A decimal separates these parts. For example, 10.33. Some developers refer to a floating-point number as a float. The float data type is not a floating-point number. For more information, see Float Data Type. For more information, see Preventing a Floating-Point Error. Floating Decimal NumbersA floating decimal number is a number that uses the same digits as a decimal integer but uses a period to indicate the fractional part of the number. For example: 0.32, 1.44, 99.44 Scientific NumbersA scientific number is a number that uses decimal digits and exponential notation. The following items represent exponential notation: A scientific number is useful if you must use very large or very small numbers. Scientific notation is also known as exponential notation. Table 7 lists example scientific numbers and their decimal equivalents. NaN NumbersNaN is a value that is an abbreviation for the following phrase: NaN is not a data type. NaN does include a literal representation. To test for NaN, you must use the isNaN function. The following example illustrates this usage: var Test = "Test String"; If the parseInt function attempts to parse Test String into an integer, then it returns NaN because Test String does not represent a number. Numeric ConstantsYou can write code that references a numeric constant as a property of the Number object. A numeric constant does not include a literal representation. Table 8 describes some numeric constants. |
Siebel eScript Language Reference | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |