Macro | Package: excl | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## add-stream-instance-flags

Arguments: stream &rest flag-names

This macro adds (via logior) instance flags to or zeroes instance flags out of the standard-instance object that is the stream. Note that this flags field has no correlation to a flags slot in the stream. You may inspect a stream in raw mode to see the instance-flags (see inspector.htm).

The behavior depends on the first of the flag-names arguments. If it is a keyword specifying a valid instance flag, then it and all the remaining keyword-named instance flags are added. But if the first of the flag-names arguments is a list of flag names, then those are zeroed out before the remaining flag-names (if any) are added. For example, the form

    (add-stream-instance-flags stream (:gray :dual :string) :simple)

first ensures that the `:gray`, `:dual`, and `:string` bits are zero, before ensuring that the `:simple` bit is set. This is done without modifiying the `:input` or `:output` bits. On the other hand, this form

    (add-stream-instance-flags stream :string :simple)

simply ensures the `:string` and `:simple` flags are set.

Valid instance flags are placed into the following groups:

- Direct stream subclass (select exactly one): `:gray` (identifies a Gray or fundamental-stream) or `:simple` (identifies a simple-stream). A stream instance that has neither bit set is not considered a stream.
- Open-ness (select one, both, or none): `:input` (stream may perform input operations); `:output` (stream may perform output operations). A stream instance that has neither bit set is not considered an open stream.
- Direct simple-stream subclass (select zero or one): `:dual` (stream is a dual-channel stream); `:string` (stream is a string-stream). A stream with neither bit set is considered a single-channel stream

You must load the `:iodefs` module to use this macro. Do that by evaluating `(require :iodefs)`. (It is not an error to evaluate that form if the module is already loaded.) This macro is intended for implementing device-level functionality and should not be used except for that purpose. See Simple-stream Description in streams.htm for a description of the device-level.

See streams.htm for information on the simple-streams implementation in Allegro CL.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version