Commit Graph

2 Commits

Author SHA1 Message Date
Bob Nystrom
bcd4df7e25 feat: make IO.printAll public and require parentheses on IO.read
Rename private `printList_` to public `printAll` across all overloaded `IO.print` methods in both Wren source and embedded C string. Update `IO.read` to require explicit `()` call syntax in test and documentation. Revise IO documentation to clarify `print`, `printAll`, `write`, and `read` semantics with updated examples.
2015-07-18 21:09:00 +00:00
Michel Martens
bdd0708a99 fix: return null from IO.read on EOF instead of empty string
Previously, IO.read would return an empty string when reading from stdin reached EOF. This changes the behavior to return null when fgets returns NULL, indicating end-of-file. The fix removes the unconditional wrenReturnString call and only returns the buffer when data was actually read. A new test case verifies that IO.read returns null on EOF.
2015-03-07 09:10:18 +00:00