19.0.0 released Nov 08, 2023
P out

Purpose: Outputs a string without encoding.

p-out <string> [ length <length> ] [ bytes-written [ define ] <bytes written> ]

p-out outputs a string expression given by <string>, without any encoding (meaning a string is output exactly as it appears). The string is sent to a client that made the request. If this is within write-string, then <string> is output into the buffer that builds a new string.

If "length" clause is used, then only <length> leading bytes of <string> are output. If "bytes-written" clause is used, then the number of bytes output will be in <bytes written>, which can be created with an optional "define".
Examples
To output data verbatim to a client:
char *mydata="Hello world";
p-out mydata

Writing to client, outputting text followed by a horizontal rule - the text is output to a client (such as browser) as it is, and the browser will interpret tags "<br/>" and "<hr/>" as a line break and a horizonal line and display them as such:
p-out "This is a non-encoded output<br/>"
p-out "<hr/>"

Create a query text string by means of write-string statement:
void get_table_data (const char *table_name)
{
   //
   // Construct the run-time text of dynamic SQL
   //
   write-string define qry_txt
   @select * from <<p-out table_name>>
   end-write-string
}

Getting the length of "table_name":
   write-string define qry_txt
   num bw;
   @select * from <<p-out table_name bytes-written bw>>
   end-write-string
   @Length of table name is <<p-num bw>>

See also
Output
finish-output  
flush-output  
output-statement  
p-dbl  
pf-out  
pf-url  
pf-web  
p-num  
p-out  
p-path  
p-url  
p-web    
See all
documentation


You are free to copy, redistribute and adapt this web page (even commercially), as long as you give credit and provide a dofollow link back to this page - see full license at CC-BY-4.0. Copyright (c) 2019-2023 Dasoftver LLC. Vely and elephant logo are trademarks of Dasoftver LLC. The software and information on this web site are provided "AS IS" and without any warranties or guarantees of any kind. Icons from table-icons.io copyright Paweł Kuna, licensed under MIT license.