Functional Problem Solving (CSC 151 2016S) : Outlines
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Taking Notes] [Rubric]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Labs] [Outlines] [Readings] - [Examples] [Handouts]
Reference: [Setup] [Remote] [VM] [Errors] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Curtsinger (2016S)] [Davis (2013F)] [Rebelsky (2015F)] [Weinman (2014F)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)]
Held: Friday, 22 April 2016
Back to Outline 43 - Higher-Order Procedures, Revisited. On to Outline 45 - Pause for Breath.
Summary
We consider files, a technique for structuring information that permits the information to persist across invocations of Scheme. Files also let our Scheme programs share information with other programs.
Related Pages
Overview
Administrivia
(open-input-file *file-name*).(open-output-file *file-name*).(read *port*)(newline *port*)(write *value* *port*)(display *value* *port*)(close-input-port *port*)(close-output-port *port*)read do when there's nothing left in the file?
It returns a special value (which DrScheme displays as
#<eof>).eof-object?(read-char *port*).read procedure.(peek-char *port*)read-char encounters the end of the file, it returns
the same special value as read