[#BloombergLP-bdldfp-DecimalConvertUtil-decimalToBID-0a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalConvertUtil.adoc[DecimalConvertUtil]::decimalToBID :relfileprefix: ../../../ :mrdocs: Populate `buffer` with the BID representation of `decimal`. == Synopsis Declared in `<bdldfp_decimalconvertutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void decimalToBID( unsigned char* buffer, xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] decimal); ---- == Description The BID representations of `Decimal32`, `Decimal64`, and `Decimal128` require 4, 8, and 16 bytes respectively. The behavior is undefined unless `buffer` points to a contiguous sequence of at least `sizeof(decimal)` bytes. Note that the BID representation is defined in section 3.5 of IEEE 754‐2008. == Parameters [cols="1,4"] |=== | Name| Description | *buffer* | receives the BID encoding | *decimal* | value to encode |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#