9.13 Chapter Summary
This chapter covered these topics:
- a review of structured data
- SET structures
- set membership, set construction
- set union, intersection, difference, and symmetric difference
- bitsets and packedsets
- the RECORD structure
- how to fill records
- how to use the WITH statement to unqualify record field names
- when to use a record or an array
- arrays of records
- storing records as streams of text, of records, and of binary data
- storing records in random access files
It included discussion of the following Modula-2 built-ins:
Reserved Words | Standard Identifiers | Symbols |
SET | BITSET | + |
OF | EXCL | - |
IN | INCL | * |
RECORD | PACKEDSET | / |
WITH | SIZE | { } |
| | = |
| | <> or # |
| | <= |
| | >= |
Imports
Library Identifiers:
- Standard:
- SYSTEM:
BITSPERLOC, SHIFT, ROTATE
- ChanConsts:
ChanFlags, ChanFlags,
readFlag, writeFlag, oldFlag, textFlag, rawFlag, interactiveFlag,
echoFlag , FlagSet , read, write, old, text, raw, interactive, echo
- StreamFile:
- RndFile:
ChanId, FlagSet, OpenResults, read, write, old, text, raw,
OpenOld, OpenClean, IsRndFile, IsRndFileException, Close,
FilePosSize, FilePos,
StartPos, CurrentPos, EndPos, NewPos, SetPos.
- Non-Standard:
- Files/Filer/FileSystem:
ReadRec, WriteRec, ReadBytes, WriteBytes.
Contents