A pseudo-file that contains the string if successful, otherwise nil.
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>
Copyright © 1995-2006 by Cogent Real-Time Systems, Inc. All rights reserved.