open_string (string)
This function allows a string to be used as a pseudo-file to facilitate reading and writing to a local buffer. All read and write functions which operate on a file can operate on the result of this call. An attempt to write to the string always appends information destructively to the string. Subsequent reads on the string can retrieve this information. A string is always opened for both read and write.
Gamma> s = open_string("Hello there."); #<File:"String"> Gamma> read_line(s); "Hello there." Gamma> s = open_string("Hello there."); #<File:"String"> Gamma> read(s); Hello Gamma> read(s); there. Gamma> read(s); "Unexpected end of file" Gamma>
close, open, read, read_char, read_double, read_float, read_line, read_long, read_short, read_until, terpri, write, writec
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.