textual-port?, binary-port? - test if ports are textual or binary
(import (rnrs)) ;R6RS
(import (rnrs io ports)) ;R6RS
(import (scheme base)) ;R7RS
is binary, and returns
These procedures accept any kind of object.
Returns a single boolean object.
(call-with-input-file "/dev/null" textual-port?)
(binary-port? (open-bytevector-input-port #vu8(1 2 3)))
Some R7RS implementations may allow both
binary and textual operations on ports.
This procedure can raise exceptions with the following condition types:
- &assertion (R6RS)
The wrong number of arguments was passed or an argument was outside its domain.
Passing the wrong number of arguments is an error.
Implementations may signal an error, extend the procedure's
domain of definition to include such arguments,
or fail catastrophically.
New in R6RS and new in R7RS. In R5RS and earlier reports, ports were
This page is part of the
It includes materials from the RnRS documents.
More information can be found at
Markup created by unroff 1.0sc, March 04, 2023.