fprintffile g 26735 26735 G Floating point number of F or E type depending on

Fprintffile g 26735 26735 g floating point number of

This preview shows page 234 - 238 out of 334 pages.

fprintf(file, "%g", 26.735); 26.735 G Floating-point number of F or E type, depending on precision. fprintf(file, "%G", 26.735); 26.735
Image of page 234
C Language Library Reference Clib File Input and Output Methods Siebel eScript Language Reference Version 8.1, Rev. A 235 Characters That Determine Width Table 135 describes characters that determine width. c Character. For example, a, b, or 8. fprintf(file, "%c", 'a'); a s String. fprintf(file, "%s", "Test"); Test Table 135. Characters That Determine Width Character Description Example Statement and Output n At least n characters are output. If the value is less than n characters, then Siebel eScript pads the output on the left with spaces. fprintf(file, "[%8s]", "Test"); [ Test] 0 n At least n characters are output, padded on the left with zeros. fprintf(file, "%08i", 26); 00000026 * The next value in the argument list is an integer that specifies the output width. fprintf(file, "[%*s]", 8, "Test"); [ Test] Table 134. Characters That Format a Value Character Description Example Statement and Output
Image of page 235
Siebel eScript Language Reference Version 8.1, Rev. A C Language Library Reference Clib File Input and Output Methods 236 Characters That Determine Precision Table 136 describes characters that determine precision. If you specify precision, then you must begin the precision format with a period (.) and you must use one of the forms described in Table 134 on page 234 . Characters That Determine Character Type Table 137 describes characters that determine character type. Table 136. Characters That Determine Precision Character Description Example Statement and Output .0 For floating-point type. No decimal point is output. fprintf(file, "%.0f", 26.735); 26 . n Output is n characters. If the value is a floating-point number, then the output is n decimal places. Assume you specify a Width value and an . n Precision value when you format a floating point number. In this situation, to determine the width of the output and to determine if it must pad the output, the method counts the decimal point and the characters that occur before and after the decimal point. For example: fprintf(file, "%10.2f", 26.735); [ 26.73] fprintf(file, "%.2f", 26.735); 26.73 .* The next value in the argument list is an integer that specifies the precision width. fprintf(file, "%.*f", 1, 26.735); 26.7 Table 137. Characters That Determine Character Type Character Description Example Statement and Output d,i Signed integer. fprintf(file, "%i", 26); 26 u Unsigned integer. fprintf(file, "%u", -1); 4294967295 o Octal integer. fprintf(file, "%o", 26); 32 x Hexadecimal integer using 0 through 9 and a, b, c, d, e, or f. fprintf(file, "%x", 26); 1a X Hexadecimal integer using 0 through 9 and A, B, C, D, E, or F. fprintf(file, "%X", 26); 1A
Image of page 236
C Language Library Reference Clib File Input and Output Methods Siebel eScript Language Reference Version 8.1, Rev. A 237 Format Characters for Methods That Scan This topic describes format characters for methods that scan. The following methods can perform a scan operation: “Clib Scan and Convert File Method” on page 247 “Clib Scan and Convert from Input Device Method” on page 249 Note the following: The format string includes character combinations that specify the type of data.
Image of page 237
Image of page 238

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