catty()
constructs a catty
vector (of class zmisc_catty
). A catty
vector is a character
vector that uses cat()
for print output, rather
than the standard print()
command. Apart from this, it behaves like a
standard character vector.
Objects of this class are convenient return values for functions that should
generally just print a desired value without the index information of a
normal print command. This is what happens if a function returning a catty
object is called interactively. However, the return value can also be
assigned to a variable for later use, making this more flexible than having
the function output the text directly.