GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’– GOLF(2gg) πŸ’–

okay bestie, we're doing the GOLF(2gg) page today and it's literally all about print-out 🫢 she's the girl who gets the data OUT of the building. no cap.


✨ NAME ✨

print-out β€” the (output) queen πŸ‘‘


🎯 PURPOSE 🎯

Print data out. that's it. that's the job. she prints, she serves, she slays πŸ’…


πŸ“œ SYNTAX πŸ“œ

print-out <string> [ <length> ] [ url-encode | web-encode ] [ new-line ]

print-out <number> new-line

print-out source-file [ new-line ]

print-out source-line [ new-line ]

four whole moods, pick your fighter πŸŽ€


🌸 DESCRIPTION 🌸

print-out outputs various kinds of data, and bestie she has RANGE πŸ’œ

  • A <string> is output:
print-out <string> [ <length> ] [ url-encode | web-encode ] [ new-line ]
  • By default, <string> is output without any encoding β€” meaning a string is output exactly as it appears. like, verbatim verbatim, no filter, main character energy. To output data verbatim to a client:
set-string mydata="Hello world"
print-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:

print-out "This is a non-encoded output<br/>" new-line
print-out "<hr/>"

Create a query text string by means of write-string statement:

//
// Construct the run-time text of dynamic SQL
//
write-string qry_txt
   @select * from <<print-out table_name>>
end-write-string
  • If "url-encode" clause is used, then the output is URL-encoded. This means such output is suited for use in URL parameters. Create a URL based on arbitrary strings used as URL parameters β€” for instance a space would be encoded as "%20" in the final output:
@<a href='<<print-out "/update">>?item=<<print-out item_name url-encode>>'>Update</a>

If "web-encode" clause is used, then the output is web-encoded (or HTML-encoded). This means such output is suited for use in web pages β€” the text will be displayed verbatim without HTML-markup being interpreted. Display "We use <hr/> markup" text, without "<hr/>" being displayed as a horizontal line:

print-out "We use <hr/> markup" web-encode

If "length" clause is used, then only <length> leading bytes of <string> are output. like a little peek, not the whole thing πŸ™ˆ

If "new-line" clause is used, then a new line ("\n") is output after <string>. she needs her space, periodt.

🚨 note bestie: all bytes of <string> are output, even if <string> contains null-bytes. every. single. byte. no skipping, no cap.
  • Outputs a number, given by <number>:
print-out <number> [ new-line ]

If "new-line" clause is used, then a new line ("\n") is output after <number>.

To output a number to a client:

set-number x = 100
print-out x
  • Outputs the file name of the current source file.
print-out source-file [ new-line ]

This outputs the file name (relative to the source code directory) of the source file where the statement is located; this is often used for debugging. detective vibes πŸ”

If "new-line" clause is used, then a new line ("\n") is output afterwards.

@This file is <<print-out source-file>>
  • Outputs current line number in the source file.
print-out source-line [ new-line ]

This outputs the line number in the source file where the statement is located. It is often used for debugging purposes.

If "new-line" clause is used, then a new line ("\n") is output afterwards.

@This line is #<<print-out source-line>>

πŸ‘€ SEE ALSO πŸ‘€

  • Output
  • finish-output
  • flush-output
  • output-statement
  • print-format
  • print-out
  • print-path
  • See all documentation

okay and that's the whole page bestie, you ate that πŸ’…βœ¨ this one's from $VERSION and it's dated $DATE, and yeah it's still living under the GOLF(2gg) name so you know where to find her πŸ¦‹πŸŽ€ mwah, go print something iconic πŸ«ΆπŸ’–

πŸ“¦ where this page comes from