[#BloombergLP-bslx-InStreamFunctions-bdexStreamIn-0b]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslx.adoc[bslx]::xref:BloombergLP/bslx/InStreamFunctions.adoc[InStreamFunctions]::bdexStreamIn
:relfileprefix: ../../../
:mrdocs:

Assign an `unsigned short` value read from `stream` to `variable`&period;

== Synopsis

Declared in `&lt;bslx&lowbar;instreamfunctions&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STREAM&gt;
STREAM&
bdexStreamIn(
    STREAM& stream,
    unsigned short& variable,
    int version = 0);
----

== Description

Assign to the specified `variable` the `unsigned short` value read from the specified input `stream`, and return a reference to `stream`&period; The optionally specified `version` is ignored&period; If `stream` is initially invalid, this operation has no effect&period; If `stream` becomes invalid during this operation, `variable` has an undefined, but valid, state&period; See the `bslx` package&hyphen;level documentation for more information on BDEX streaming of value&hyphen;semantic types and containers&period;

== Return Value

a reference to `stream`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stream*
| input stream from which to read
| *variable*
| object to receive the unexternalized value
| *version*
| optional BDEX version (ignored for this type)
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
