![]() | Chapter 21: Figures, Sounds and Files | ![]() ![]() |
21.13. Writing, reading and appending text to files |
Text can also be saved to a file, and again all file-handling is automatic:
write "Jackdaws love my big sphinx of quartz." to the file of Abecedary Wisdom;
append "Jinxed wizards pluck ivy from the big quilt." to the file of Abecedary Wisdom;
The difference between "write" and "append" here is that "write" makes this text the entire contents of the file, whereas "append" adds it the end (creating the file if it did not previously exist).
The quoted text can, of course, contain substitutions, so can be long and complex if need be.
Text from a file is printed back with the text substitution:
"[text of the File of Abecedary Wisdom]"
To copy one file to another, for instance,
write "[text of the file of Abecedary Wisdom]" to the file of Secondary Wisdom;
| ![]() Notebooks in which the player can record assorted notes throughout play. |
|
| ![]() ![]() An expansion on the notebook, allowing the player somewhat more room in which to type his recorded remark. |
|
Previous | Contents | Next |