[#BloombergLP-bdljsn-JsonNumber-asShort]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonNumber.adoc[JsonNumber]::asShort
:relfileprefix: ../../../
:mrdocs:

Load into the specified `result` the integer value of this number&period; Return 0 on success, `k&lowbar;OVERFLOW` if `value` is larger than can be represented by `result`, `k&lowbar;UNDERFLOW` if `value` is smaller than can be represented by `result`, and `k&lowbar;NOT&lowbar;INTEGRAL` if `value` is not an integral number (i&period;e&period;, there is a fractional part)&period; For underflow, `result` will be loaded with the minimum representable value, for overflow, `result` will be loaded with the maximum representable value, for non&hyphen;integral values `result` will be loaded with the integer part of `value` (truncating the fractional part)&period; If the result is not an integer and also either overflows or underflows, it is treated as an overflow or underflow (respectively)&period; Note that this operation returns an error status value (unlike similar floating point conversions) because typically it is an error if a conversion to an integer results in an in&hyphen;exact value&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;jsonnumber&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
asShort(short* result) const;
----


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