</pre></div></div></div><scripttype="text/javascript">AddLanguageTabSet("ID0EDCA");</script><h4class="subHeading">Parameters</h4><dl><dt><spanclass="parameter">stream</span></dt><dd>Type:<ahref="542faa00-d28a-72a2-2dd8-6c6021e683ce.htm">Math.Gmp.Native<spanid="LSTF0530466_1"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_1?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>ptr</a><spanid="LSTF0530466_2"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_2?cs=<|vb=(Of |cpp=<|fs=<'|nu=(");</script><ahref="1bcc07bd-8fee-1107-844c-a5ff10e7660c.htm">FILE</a><spanid="LSTF0530466_3"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_3?cs=>|vb=)|cpp=>|fs=>|nu=)");</script><br/>Pointer to file streama.</dd><dt><spanclass="parameter">op</span></dt><dd>Type:<ahref="8beda7fb-bbc4-b56f-fd1f-1459377ecb3b.htm">Math.Gmp.Native<spanid="LSTF0530466_4"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_4?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpz_t</a><br/>The operand integer.</dd></dl><h4class="subHeading">Return Value</h4>Type:<ahref="d9761bfb-1882-59d2-e89b-c6460141f9a6.htm">size_t</a><br/>Return the number of bytes written, or if an error occurred, return 0.</div><divclass="collapsibleAreaRegion"><spanclass="collapsibleRegionTitle"onclick="SectionExpandCollapse('ID2RB')"onkeypress="SectionExpandCollapse_CheckKey('ID2RB', event)"tabindex="0"><imgid="ID2RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>Remarks</span></div><divid="ID2RBSection"class="collapsibleSection"><p>
The integer is written in a portable format, with 4 bytes of size information, and that many bytes of limbs.
Both the size and the limbs are written in decreasing significance order (i.e., in big-endian).
</p><p>
The output can be read with <ahref="44097b06-123a-4c00-b17f-ab0c70ad78bb.htm">mpz_inp_raw(mpz_t, ptr<spanid="LSTF0530466_5"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_5?cs=<|vb=(Of |cpp=<|fs=<'|nu=(");</script>FILE<spanid="LSTF0530466_6"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_6?cs=>|vb=)|cpp=>|fs=>|nu=)");</script>)</a>.
</p><p>
The output of this can not be read by <spanclass="code">mpz_inp_raw</span> from GMP 1,
because of changes necessary for compatibility between 32-bit and 64-bit machines.
</p></div><divclass="collapsibleAreaRegion"><spanclass="collapsibleRegionTitle"onclick="SectionExpandCollapse('ID3RB')"onkeypress="SectionExpandCollapse_CheckKey('ID3RB', event)"tabindex="0"><imgid="ID3RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>Examples</span></div><divid="ID3RBSection"class="collapsibleSection"><divclass="codeSnippetContainer"><divclass="codeSnippetContainerTabs"><divid="ID0EDAABA_tab1"class="codeSnippetContainerTab"><ahref="#"onclick="javascript:ChangeTab('ID0EDAABA','cs','1','4');return false;">C#</a></div><divid="ID0EDAABA_tab2"class="codeSnippetContainerTab"><ahref="#"onclick="javascript:ChangeTab('ID0EDAABA','vb','2','4');return false;">VB</a></div><divid="ID0EDAABA_tab3"class="codeSnippetContainerTabPhantom"><ahref="#"onclick="javascript:ChangeTab('ID0EDAABA','cpp','3','4');return false;">C++</a></div><divid="ID0EDAABA_tab4"class="codeSnippetContainerTabPhantom"><ahref="#"onclick="javascript:ChangeTab('ID0EDAABA','fs','4','4');return false;">F#</a></div></div><divclass="codeSnippetContainerCodeContainer"><divclass="codeSnippetToolBar"><divclass="codeSnippetToolBarText"><aid="ID0EDAABA_copyCode"href="#"class="copyCodeSnippet"onclick="javascript:CopyToClipboard('ID0EDAABA');return false;"title="Copy">Copy</a></div></div><divid="ID0EDAABA_code_Div1"class="codeSnippetContainerCode"style="display: block"><prexml:space="preserve"><spanclass="highlight-comment">// Create, initialize, and set the value of op to 123456 (0x1E240).</span>
mpz_t op = <spanclass="highlight-keyword">new</span> mpz_t();
<spanclass="highlight-comment">// Release unmanaged memory allocated for op.</span>
gmp_lib.mpz_clear(op);</pre></div><divid="ID0EDAABA_code_Div2"class="codeSnippetContainerCode"style="display: none"><prexml:space="preserve"><spanclass="highlight-comment">' Create, initialize, and set the value of op to 123456 (0x1E240).</span>
<spanclass="highlight-keyword">Dim</span> op <spanclass="highlight-keyword">As</span><spanclass="highlight-keyword">New</span> mpz_t()
<spanclass="highlight-comment">' Close temporary file.</span>
fclose(stream.Value.Value)
<spanclass="highlight-comment">' Assert that the content of the temporary file.</span>
<spanclass="highlight-keyword">Dim</span> r <spanclass="highlight-keyword">As</span><spanclass="highlight-keyword">Byte</span>() = System.IO.File.ReadAllBytes(pathname)
<spanclass="highlight-comment">' Release unmanaged memory allocated for op.</span>
gmp_lib.mpz_clear(op)</pre></div><divid="ID0EDAABA_code_Div3"class="codeSnippetContainerCode"style="display: none"><p>No code example is currently available or this language may not be supported.</p></div><divid="ID0EDAABA_code_Div4"class="codeSnippetContainerCode"style="display: none"><p>No code example is currently available or this language may not be supported.</p></div></div></div><scripttype="text/javascript">AddLanguageTabSet("ID0EDAABA");</script></div><divclass="collapsibleAreaRegion"id="seeAlsoSection"><spanclass="collapsibleRegionTitle"onclick="SectionExpandCollapse('ID4RB')"onkeypress="SectionExpandCollapse_CheckKey('ID4RB', event)"tabindex="0"><imgid="ID4RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>See Also</span></div><divid="ID4RBSection"class="collapsibleSection"><h4class="subHeading">Reference</h4><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm">gmp_lib Class</a></div><divclass="seeAlsoStyle"><ahref="d9c51b9f-0c54-770b-28ea-6eebd8fef368.htm">Math.Gmp.Native Namespace</a></div><divclass="seeAlsoStyle"><ahref="6f85986d-b6a0-435d-3675-c025ef70413d.htm">gmp_lib<spanid="LSTF0530466_7"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_7?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpz_out_str(ptr<spanid="LSTF0530466_8"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_8?cs=<|vb=(Of |cpp=<|fs=<'|nu=(");</script>FILE<spanid="LSTF0530466_9"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_9?cs=>|vb=)|cpp=>|fs=>|nu=)");</script>, Int32, mpz_t)</a></div><divclass="seeAlsoStyle"><ahref="8b8d6ec1-3ae5-e6f3-f030-289abe5002d0.htm">gmp_lib<spanid="LSTF0530466_10"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_10?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpz_inp_str(mpz_t, ptr<spanid="LSTF0530466_11"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_11?cs=<|vb=(Of |cpp=<|fs=<'|nu=(");</script>FILE<spanid="LSTF0530466_12"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_12?cs=>|vb=)|cpp=>|fs=>|nu=)");</script>, Int32)</a></div><divclass="seeAlsoStyle"><ahref="44097b06-123a-4c00-b17f-ab0c70ad78bb.htm">gmp_lib<spanid="LSTF0530466_13"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_13?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpz_inp_raw(mpz_t, ptr<spanid="LSTF0530466_14"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_14?cs=<|vb=(Of |cpp=<|fs=<'|nu=(");</script>FILE<spanid="LSTF0530466_15"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF0530466_15?cs=>|vb=)|cpp=>|fs=>|nu=)");</script>)</a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="https://gmplib.org/manual/I_002fO-of-Integers.html#I_002fO-of-Integers">GNU MP - I/O of Integers</a></a></div></div></div></div><divid="pageFooter"class="pageFooter"></div></body></html>