Next: , Previous: Scheme Syntax, Up: Read/Load/Eval

5.13.2 Reading Scheme Code

— Scheme Procedure: read [port]
— C Function: scm_read (port)

Read an s-expression from the input port port, or from the current input port if port is not specified. Any whitespace before the next token is discarded.

The behaviour of Guile's Scheme reader can be modified by manipulating its read options. For more information about options, See User level options interfaces. If you want to know which reader options are available, See Reader options.

— Scheme Procedure: read-options [setting]

Display the current settings of the read options. If setting is omitted, only a short form of the current read options is printed. Otherwise, setting should be one of the following symbols:

Display the complete option settings.
Like help, but also print programmer options.

— Scheme Procedure: read-enable option-name
— Scheme Procedure: read-disable option-name
— Scheme Procedure: read-set! option-name value

Modify the read options. read-enable should be used with boolean options and switches them on, read-disable switches them off. read-set! can be used to set an option to a specific value.

— Scheme Procedure: read-options-interface [setting]
— C Function: scm_read_options (setting)

Option interface for the read options. Instead of using this procedure directly, use the procedures read-enable, read-disable, read-set! and read-options.