It returns one of the following values If successful then it returns the number

It returns one of the following values if successful

This preview shows page 264 - 267 out of 334 pages.

you define. It returns one of the following values: If successful, then it returns the number of characters it wrote in the buffer. If not successful, then it returns the following value: EOF You are not required to define the string value. It is large enough to hold the result. Format Clib.sprintf(s tringVar, formatString, var1, var2, ..., var n) This method performs the same work and uses the same arguments as the Clib Formatted String method except it also includes the stringVar argument. This argument identifies the name of the variable to which the Clib Write Formatted String method writes the formatted string. For more information, “Clib Get Formatted String Method” on page 258 . Example The following example uses the Clib Write Formatted String method with various format string arguments: TheApplication().TraceOn("c:\\eScript_trace.txt","allocation","all"); var a, b, c; a = 5; b = 2; Clib.sprintf(c, "First # %d + Second # %d is equal to %03d",a,b, a+b); TheApplication().Trace("Output : " + c); Clib.sprintf(c, "\n First # %d \n Second # %d \n => %d",12,16, 12+16) TheApplication().Trace("Output : " + c); var x, y, z, n; var x = "Ali is 25 years old"; var y = "he lives in Ireland."; var n = Clib.sprintf(z, "\n %s and %s",x,y) ; TheApplication().Trace("Output : " + z); TheApplication().Trace("Total characters: " + n); var a = 16.51; var b = 5.79; var c; Clib.sprintf(c, "%.3f / %.3f is equal to %0.3f",a,b, parseFloat(a/b));
Image of page 264
C Language Library Reference Clib Buffer Methods Siebel eScript Language Reference Version 8.1, Rev. A 265 TheApplication().Trace("Output : " + c); TheApplication().TraceOff(); This example produces the following result: 02/18/04,18:37:35,START,7.5.3 [16157] LANG_INDEPENDENT,SADMIN,3964,3836 02/18/04,18:37:35,COMMENT,Output : First # 5 + Second # 2 is equal to 007 02/18/04,18:37:35,COMMENT,"Output : First # 12 Second # 16 => 28" 02/18/04,18:37:35,COMMENT,"Output : Ali is 25 years old and he lives in Ireland." 02/18/04,18:37:35,COMMENT,Total characters: 46 02/18/04,18:37:35,COMMENT,Output : 16.510 + 5.790 is equal to 2.851 02/18/04,18:37:35,STOP Clib Buffer Methods This topic describes Clib buffer methods. It includes the following topics: “Clib Get Memory Method” on page 265 “Clib Compare Memory Method” on page 266 “Clib Copy Memory Method” on page 267 “Clib Set Memory Method” on page 267 Clib Get Memory Method The Clib Get Memory method searches a buffer for the first occurrence of a character that you specify. It returns one of the following values: If it finds the character you specify, then it returns the contents of the buffer starting at that character. If it does not find the character you specify, then it returns the following value: Null Format Clib.memchr (bufferVar, char [ , size ])
Image of page 265
Siebel eScript Language Reference Version 8.1, Rev. A C Language Library Reference Clib Buffer Methods 266 Table 161 describes the arguments for the Clib Get Memory method. Clib Compare Memory Method The Clib Compare Memory method compares the contents of two buffers. It returns one of the following values: If the value in the buf1 argument is less than the value in the buf2 argument, then it returns a negative number.
Image of page 266
Image of page 267

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