1 Language Model
2 Syntactic Forms
3 Datatypes
4 Structures
5 Classes and Objects
6 Units
7 Contracts
8 Pattern Matching
9 Control Flow
10 Concurrency
11 Macros
12 Input and Output
13 Reflection and Security
14 Operating System
15 Memory Management
16 Running PLT Scheme
Bibliography
Index
On this page:
prop: input-port
prop: output-port
Version: 4.0.2

 

12.1.8 Structures as Ports

prop:input-port : struct-type-property?

prop:output-port : struct-type-property?

The prop:input-port and prop:output-port structure type properties identify structure types whose instances can serve as input and output ports, respectively.

Each property value can be either of the following:

Some procedures, such as file-position, work on both input and output ports. When given an instance of a structure type with both the prop:input-port and prop:output-port properties, the instance is used as an input port.