<i>GOO</i> Manual -- Formatted I/O

|  |  | Formatted I/O

## Formatted I/O

GOO provides convenient s-expression reading/writing facilities.

`read` | `(x|<in-port> => <any>)` | `G`
| returns sexpr result of parsing characters in a sequence. |
`write` | `(x|<out-port> y|<any>)` | `G`
| verbose printing. prints strings with double quotes etc. |
`writeln` | `(x|<out-port> y|<any>)` | `G`
| == `(seq (write x y) (newline x))` |
`emit` | `(x|<out-port> y|<any>)` | `G`
| concise printing (e.g., prints strings without double quotes). |
`msg` | `(x|<out-port> message|<seq> args|...)` | `G`
| formatted output using special commands embedded in message. supported commands are: `%= -> (write x arg)` `%s -> (display x arg)` `%d -> (write x arg)` `%% -> (write-char x #\%)` which consume one argument at a time. otherwise subsequent message characters are printed to port `x` (cf. Dylan's and CL's `format`). |
`post` | `(message|<seq> args|...)` | `G`
| == `(app msg out message args)` |

|  |  | Formatted I/O