File input and file output methods in Siebel eScript read the file into a

File input and file output methods in siebel escript

This preview shows page 233 - 235 out of 334 pages.

File input and file output methods in Siebel eScript read the file into a buffer in memory and return a file pointer , which is a pointer that references the beginning of the buffer. The file stream is the data that the buffer contains. Reading and writing occurs relative to the buffer, which is not written to disk unless you explicitly use the Clib Clear Buffer method to clear the buffer or use the Clib Close File method to close the file. Format Characters for Methods That Print and Scan A method that prints or scans uses a format string to format the data that the method reads and writes. Format Characters for Methods That Print This topic describes format characters for methods that print. The following methods can perform print operations: “Clib Write Formatted String Method” on page 251 “Clib Get Formatted String Method” on page 258 “Clib Write Formatted String Method” on page 264 Each of these methods prints each character while it reads the input until the method encounters a percentage symbol (%). This symbol instructs that method to use the following format to print a value: %[ flags ][ width ][. precision ] type To include the % symbol as a character in the string, you use two consecutive percentage symbols (%%).
Image of page 233
Siebel eScript Language Reference Version 8.1, Rev. A C Language Library Reference Clib File Input and Output Methods 234 Characters That Format Values Table 134 describes characters that format a value. Table 134. Characters That Format a Value Character Description Example Statement and Output - Left justification in the field with space padding or right justification with zero or space padding. fprintf(file, "[%-8i]", 26); [26 ] + Force numbers to begin with a plus symbol (+) or a minus symbol (-). fprintf(file, "%+i", 26); +26 space A negative value that begins with a minus symbol (-). A positive value begins with a space. fprintf(file, "[% i]", 26); [ 26] # Append one of the following symbols to the pound (#) character to display the output in one of the following forms: o. Prefix a zero to nonzero octal output. x or X. Prefix 0x or 0X to the output, which indicates hexadecimal. f. Include a decimal point even if no digits follow the decimal point. e or E. Include a decimal point even if no digits follow the decimal point, and display the output in scientific notation. g or G. Include a decimal point even if no digits follow the decimal point, display the output in scientific notation, depending on precision, and leave trailing zeros in place. fprintf(file, "%#o", 26); 032 fprintf(file, "%#x", 26); 0x1A fprintf(file, "%#.f", 26); 26. fprintf(file, "%#e", 26); 2.600000e+001 fprintf(file, "%#g", 26); 26.0000 f Floating-point of the format [-]dddd.dddd. fprintf(file, "%f", 26.735); 26.735000 e Floating-point of the format [-]d.ddde+dd or [-]d.ddde-dd. fprintf(file, "%e", 26.735); 2.673500e+001 E Floating-point of the format [-]d.dddE+dd or [-]d.dddE-dd. fprintf(file, "%E", 26.735); 2.673500E+001 g Floating-point number of f or e type, depending on precision.
Image of page 234
Image of page 235

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

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes