Writes a single character to out; more precisely, the bytes that are the UTF-8 encoding of char are written to out.
Writes a single byte to out.
Writes characters to
outfrom
strstarting from index
start-pos(inclusive) up to
end-pos(exclusive). Like
substring, the
exn:fail:contractexception is raised if
start-posor
end-posis out-of-range for
str.
The result is the number of characters written to out, which is always (- end-pos start-pos).
If str is mutable, mutations after write-string returns do not affect the characters written to out. (This independence from mutation is not a special property of write-string, but instead generally true of output functions.)
Like
write-bytes, but returns without blocking after writing as many bytes as it can immediately flush. It blocks only if no bytes can be flushed immediately. The result is the number of bytes written and flushed to
out; if
start-posis the same as
end-pos, then the result can be
0(indicating a successful flush of any buffered data), otherwise the result is between
1and
(- end-pos start-pos), inclusive.
The write-bytes-avail procedure never drops bytes; if write-bytes-avail successfully writes some bytes and then encounters an error, it suppresses the error and returns the number of written bytes. (The error will be triggered by future writes.) If an error is encountered before any bytes have been written, an exception is raised.
Like
write-bytes-avail, but never blocks, returns
#fif the port contains buffered data that cannot be written immediately, and returns
0if the port’s internal buffer (if any) is flushed but no additional bytes can be written immediately.
Like
write-bytes-avail, except that breaks are enabled during the write. The procedure provides a guarantee about the interaction of writing and breaks: if breaking is disabled when
write-bytes-avail/enable-breakis called, and if the
exn:breakexception is raised as a result of the call, then no bytes will have been written to
out. See also
Breaks.
Writes
vdirectly to
outif the port supports special writes, or raises
exn:fail:contractif the port does not support special write. The result is always
#t, indicating that the write succeeded.
Like
write-special, but without blocking. If
vcannot be written immediately, the result is
#fwithout writing
v, otherwise the result is
#tand
vis written.
Synchronizing on the object starts a write from bstr, and the event becomes ready when bytes are written (unbuffered) to the port. If start-pos and end-pos are the same, then the synchronization result is 0 when the port’s internal buffer (if any) is flushed, otherwise the result is a positive exact integer. If the event is not selected in a synchronization, then no bytes will have been written to out.
Similar to
write-special, but instead of writing the special value immediately, it returns a synchronizable event (see
Events). The
outmust support atomic writes, as indicated by
port-writes-atomic?.
Synchronizing on the object starts a write of the special value, and the event becomes ready when the value is written (unbuffered) to the port. If the event is not selected in a synchronization, then no value will have been written to out.
Returns
#tif procedures like
write-specialcan write arbitrary values to the port. Racket’s file-stream ports, pipes, string ports, and TCP ports all reject special values, but ports created with
make-output-port(see
Custom Ports) may support them.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4