Format Clibsscanf formatString v ar1 var2 var n Clib Unget Method The Clib

Format clibsscanf formatstring v ar1 var2 var n clib

This preview shows page 249 - 252 out of 334 pages.

Format Clib.sscanf([ formatString ] [,v ar1, var2, ... , var n]) Clib Unget Method The Clib Unget method pushes a character back into a file. It returns one of the following values:
Image of page 249
Siebel eScript Language Reference Version 8.1, Rev. A C Language Library Reference Clib File Input and Output Methods 250 If successful, then it returns the value that the char argument contains. If not successful, then it returns the following value: EOF If this method pushes a character back into a file, then it converts the character that you specify in the char argument to a byte. It only pushes back one character. After the unget, this character is again available in the file for subsequent retrieval. You might need to use this method to read up to, but not including, a newline character. You can then use it to push the newline character back into the file buffer. Format Clib.ungetc( char, filePointer ) Table 147 describes the arguments for the Clib Unget method. Clib Write Character Method The Clib Write Character method writes a character, converted to a byte, to a file that you specify. It returns one of the following values: If successful, then it returns the value that the char argument contains. If not successful, then it returns the following value: EOF The following type of character that the char argument contains determines how this method writes the character: String. It writes the first character of the string to the file. Number. It writes the character that corresponds to the Unicode value for this number to the file. Format Clib.fputc( char, filePointer ) Clib.putc( char, filePointer ) Table 147. Arguments for the Clib Unget Method Argument Description char The character that this method pushes back. It puts back one character to the file stream from which it reads. It moves the seek position of the file pointer by one character position. filePointer A file pointer that the Clib Open File method returns.
Image of page 250
C Language Library Reference Clib File Input and Output Methods Siebel eScript Language Reference Version 8.1, Rev. A 251 Clib.fputc writes a character to a file. Clib.putc writes a character to the screen. In most situations, to avoid an error with macro usage, you must use Clib.fputc. Table 148 describes the arguments for the Clib Write Character method. Clib Write Formatted String Method The Clib Write Formatted String method writes a formatted string to a file. Format Clib.fprintf( filePointer, formatString ) Table 149 describes the arguments for the Clib Write Formatted String method. Example The following example uses the Clib Write Formatted String method with various values for the formatString argument: function Service_PreInvokeMethod (MethodName, Inputs, Outputs) { if (MethodName == "fprintfsamples") { var intgr = 123456789; var flt = 12345.6789; var hour = 1; var min = 7; var sec = 0; var str = "Hello World"; var file = Clib.fopen("c:\\temp\\fprintf.txt", "w"); // Simple formatting: Table 148. Arguments for the Clib Write Character Method Argument Description char A one character string or variable that contains a single character.
Image of page 251
Image of page 252

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