It returns the integer that is closest in value to the value that the number

It returns the integer that is closest in value to

This preview shows page 196 - 198 out of 334 pages.

It returns the integer that is closest in value to the value that the number argument contains. This method uses the same argument as the Get Absolute Value method. For more information, see Table 107 on page 185 . Format Math.round( number ) Example The following example uses the Round Number method: var a = Math.round(123.6); var b = Math.round(-123.6) TheApplication().RaiseErrorText(a + "\n" + b) This example provides the following results: 124 negative 124 Avoiding Precision Loss Due to Rounding The following example illustrates precision loss due to rounding: var n = 34.855; n = n* 100; var r = Math.round(n) The value of the n variable is 3485.499999999999995 instead of 3485.5. Rounding this value results in a value of 3485 instead of 3486. The following example avoids loss of precision due to rounding: var n = parseFloat(34.855); n = parseFloat(n1b*100.0); var r = Math.round(n); NOTE: If you multiply or divide a value and then round that value, then rounding might not be precise. Multiplication and division can cause precision loss. Regular Expression Methods This topic describes regular expression methods. It includes the following topics: “Overview of Regular Expression Methods” on page 197
Image of page 196
Methods Reference Regular Expression Methods Siebel eScript Language Reference Version 8.1, Rev. A 197 “Properties of Regular Expressions” on page 197 “Compile Regular Expressions Method” on page 199 “Get Regular Expression from String Method” on page 200 “Is Regular Expression in String Method” on page 203 Overview of Regular Expression Methods A regular expression is an object instance of a character pattern that is associated with attributes that ECMAScript uses to perform a character pattern search of a string. A regular expression uses the following short format: RegExp For more information, see ECMAScript specifications. The Siebel T eScript engine supports the following methods of the regular expression object. The Siebel ST eScript engine does not support these methods: RegExp.$n, including '$_' and '$&' RegExp.input RegExp.lastMatch RegExp.lastParen RegExp.leftContext RegExp.rightContext If you must use ST eScript code, then instead of using one of these methods you must modify your script to use an equivalent function on the target object. Properties of Regular Expressions This topic describes properties of regular expressions. The Siebel ST eScript engine and the Siebel T eScript engine supports these properties. Throughout this topic, the term regexp represents an object instance of a regular expression. To change the attribute of a regular expression instance for one of these properties, you can use the Compile Regular Expressions method. For example, if you must change the global attribute of a regular expression instance. For more information, see “Compile Regular Expressions Method” on page 199 .
Image of page 197
Image of page 198

You've reached the end of your free preview.

Want to read all 334 pages?

  • Summer '16
  • Oracle
  • Type system, Siebel, Siebel eScript

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors