⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ostr_out.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
字号:
:CMT.========================================================================
:P.
.ix 'ostream output'
This chapter describes formatted and unformatted output.
:CMT.========================================================================
:SECTION.Formatted Output: Inserters
.ix 'formatted output'
The
:MONO.operator~b<<
function is used to write formatted values to a stream.
It is called an
:ITALICS.inserter
:PERIOD.
:I1.inserter
Values are formatted and written according to the type of object
being inserted and &fmtflags.:PERIOD.
:P.
All
:MONO.operator~b<<
functions perform the same basic sequence of operations.
First,
the output prefix function
:MONO.opfx
is called.  If it fails and returns zero, the
:MONO.operator~b<<
function also fails and returns immediately.
If the output prefix function succeeds, the object is formatted according
to its type and &fmtflags.:PERIOD.
The formatted sequence of characters is
then written to the specified stream.  Finally, the output suffix function
:MONO.osfx
is called.
:P.
The
:MONO.operator~b<<
functions return a reference to the specified stream so that multiple
insertions can be done in one statement.
:P.
For details on the interpretation of &fmtflags., see the &fmtflags.
section of the Library Functions and Types Chapter.
:P.
Errors are indicated via &iostate.:PERIOD.
&failbit. is set if the
:MONO.operator~b<<
function fails while writing the characters to the stream.
:CMT.========================================================================
:SECTION.Unformatted Output
.ix 'unformatted output'
The unformatted output functions are used to write characters
to the stream without conversion.
:P.
Like the inserters, the unformatted output functions follow a pattern.
First, they call the output prefix function
:MONO.opfx
and fail if it fails.
Then the characters are written without conversion.  Finally,
the output suffix function
:MONO.osfx
is called.
:P.
Errors are indicated via &iostate.:PERIOD.
&failbit. is set if the function fails while writing the characters to
the stream.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -