![]() |
install | documentation | examples | articles | changelog 16.6.0 released on Mar 08, 2023 | articles updated on Mar 20, 2023
|
pf-out [ bytes-written [ define ] <bytes> ] [ to-error ] <format> <expression> [ , <expression> ]...
pf-out formats a string according to the <format> string and a list of variable-type <expression>s (in the same way C's "printf()" does) and then outputs the result without any encoding (meaning a string is output exactly as it is, and the client may interpret such text in any way it sees fit). The result is sent to a client that made the request. If another string is built by using write-string, then the result is output into the buffer that builds a new string.pf-out bytes-written define bwritten "%s is %d", "the number", 20
The following is writing to client, outputting text for which the browser will interpret tags "<br/>" and "<hr/>" as a line break and a horizontal line and display them as such:pf-out "<hr/> %s <br/>", "This is a non-encoded output"
Create a query text string by means of write-string statement:void get_table_data (const char *table_name, num id_num)
{
//
// Construct the run-time text of dynamic SQL
//
write-string define qry_txt
@select * from <<pf-out "%s where id="%lld", table_name, id_num>>
end-write-string
}