If you enclose multiple statements in curly brackets then Siebel eScript treats

If you enclose multiple statements in curly brackets

This preview shows page 57 - 59 out of 334 pages.

immediately after the While statement in a loop. If you enclose multiple statements in curly brackets, then Siebel eScript treats them as one statement and runs them in the loop. The following example includes this usage: while( ThereAreUncalledNamesOnTheList() == true) { var name = GetNameFromTheList(); CallthePerson(name); LeaveTheMessage(); } Siebel eScript treats the three lines that occur after the While statement as one unit. The brackets cause Siebel eScript to run the script through each line until it calls every name in the list. If you remove these brackets, then it does the following: Runs the loop only for the first line. Processes the names on the list but only calls the last name. Use a Primitive Data Type Instead of an Object Data Type It is recommended that you use an object only if you must use a property that is specific to that object type. If an equivalent primitive data type exists, then use the primitive. A primitive data type provides superior performance. An object data type consumes more resources than a primitive data type. Table 16 lists primitive data types that are equivalent to object data types. For example, if you do not need to use a string-specific object or conversion method, then use the chars primitive instead of a String object. Use White Space to Improve Readability A white-space character is a type of character that determines the spacing and placement of text in your code. Each of the following items is an example of a white-space character: Space Table 16. Primitive Data Types That Are Equivalent to Object Data Types Primitive Data Type Object Data Type Chars String Float Number Bool Boolean
Image of page 57
Siebel eScript Language Reference Version 8.1, Rev. A Using Siebel eScript Guidelines for Using Siebel eScript 58 Tab Carriage-return New line White space makes your code easier to read. Siebel eScript ignores white space characters. A line of script ends with a carriage-return character. Each line is typically a separate statement. In some editors a line ends with a carriage-return and the following linefeed pair: \r\n Siebel eScript typically interprets as white space one or more white-space characters that exist between names of methods and functions. Each of the following Siebel eScript statements are equivalent to one another: var x=a+b var x = a + b var x = a + b var x = a+ b White space separates the names, methods, functions, and variables. For example, ab is one variable name, and a b are two variable names. The following example is valid: var ab = 2 The following example is not valid: var a b = 2 Some developers use spaces and not tabs because tab size settings vary from editor to editor. If a developer uses only spaces, then the script format is consistent across editors. Using White Space in a String Literal Can Cause Errors CAUTION: Siebel eScript treats white space in a string literal differently from how it treats white space that occurs elsewhere. Placing a line break in a string causes Siebel eScript to treat each line as a separate statement. Each of these statements contains an error because they are not complete.
Image of page 58
Image of page 59

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