Sybernet / Supplied Procedures Reference
Release 3.00
JUL 18, 2006
backwards forwards

HTTP.SPRINTF

The sprintf() function places output in consecutive bytes starting at the beginning BUF which is set to NULL upon entering this function. It is the user's responsibility to ensure that enough storage is available.

The format (FMT) is composed of zero or more directives: ordinary characters, which are simply copied to the output stream and conversion specifications, each of which results in the fetching of zero or more arguments. The results are undefined if there are insufficient arguments for the format. If the format is exhausted while arguments remain, the excess arguments are evaluated but are otherwise ignored.

Patterned after its C namesake, the reader should refer to its man page for further documentation.

Syntax

Procedure SPRINTF
(
    BUF                       OUT VARCHAR2
,   FMT                       IN  VARCHAR2
,   ...                       IN  VARCHAR2
)   ;

Parameters

Parameter Description
buf
 
Output buffer.
fmt
 
Format.
...
 
Zero or more parameters.

Example

The following block illustrates how to call sprintf:

declare
    buf varchar(30);
begin
    http.sprintf(buf,'%s\n','Hello World');
    http.write(buf);
end;


See Also

PRINTF
FPRINTF



Sybernet is a trademark of SRI International.
Copyright © 1996-2008 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/