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

HTTP.PRINTF

The printf() function places output on the standard output stream.

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 PRINTF
(
    @FMT                      VARCHAR(255)
,   ...                       VARCHAR(255)
)   ;

Parameters

Parameter Description
fmt
 
Format.
...
 
Zero or more parameters.

Example

The following block illustrates how to call printf:

declare
    @width varchar(30)
begin
    select @width = '20'
    exec http.dbo.printf '%*s\n', @width, 'Hello World'
end


See Also

SPRINTF



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