</pre></div></div></div><scripttype="text/javascript">AddLanguageTabSet("ID0EDCA");</script><h4class="subHeading">Parameters</h4><dl><dt><spanclass="parameter">rop</span></dt><dd>Type:<ahref="37c88d6c-8d02-2330-ad77-f20fb73d1677.htm">Math.Gmp.Native<spanid="LST8C6B5A0E_1"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LST8C6B5A0E_1?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpf_t</a><br/>The result float.</dd><dt><spanclass="parameter">str</span></dt><dd>Type:<ahref="06249483-9daf-95f9-32c7-30195550bbcc.htm">Math.Gmp.Native<spanid="LST8C6B5A0E_2"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LST8C6B5A0E_2?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>char_ptr</a><br/>The operand string.</dd><dt><spanclass="parameter">base</span></dt><dd>Type:<ahref="http://msdn2.microsoft.com/en-us/library/td2s409d"target="_blank">System<spanid="LST8C6B5A0E_3"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LST8C6B5A0E_3?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>Int32</a><br/>The base.</dd></dl><h4class="subHeading">Return Value</h4>Type:<ahref="http://msdn2.microsoft.com/en-us/library/td2s409d"target="_blank">Int32</a><br/>This function returns 0 if the entire string is a valid number in base <spanclass="parameter">base</span>. Otherwise it returns -1.</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>
Note that <spanclass="parameter">rop</span> is initialized even if an error occurs. (I.e., you have to call <ahref="3a2a17ed-a64c-8716-7f65-18c661a5279f.htm">mpf_clear</a> for it.)
The precision of <spanclass="parameter">rop</span> will be taken from the active default precision, as set by <ahref="9e93d02e-f5c7-1a6f-68fe-a33d793a93e2.htm">mpf_set_default_prec</a>.
<spanclass="highlight-comment">// Release unmanaged memory allocated for x and y.</span>
gmp_lib.mpf_clear(x);
gmp_lib.free(<spanclass="highlight-keyword">value</span>);</pre></div><divid="ID0EDAABA_code_Div2"class="codeSnippetContainerCode"style="display: none"><prexml:space="preserve"><spanclass="highlight-comment">' Set default precision to 64 bits.</span>
<spanclass="highlight-comment">' Create, initialize, and set a new floating-point number x to 0.0234.</span>
<spanclass="highlight-keyword">Dim</span> value <spanclass="highlight-keyword">As</span><spanclass="highlight-keyword">New</span> char_ptr(<spanclass="highlight-literal">"234e-4"</span>)
<spanclass="highlight-keyword">Dim</span> x <spanclass="highlight-keyword">As</span><spanclass="highlight-keyword">New</span> mpf_t()
gmp_lib.free(value)</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="17b3dc26-68af-fb0c-9923-36777e8bd87e.htm">mpf_init_set</a></div><divclass="seeAlsoStyle"><ahref="8d1b97c9-ef9d-303a-0fbe-e7ece7edf391.htm">mpf_init_set_ui</a></div><divclass="seeAlsoStyle"><ahref="dc1406fd-4ca4-70d3-dc83-bd40b955564a.htm">mpf_init_set_si</a></div><divclass="seeAlsoStyle"><ahref="a2c14761-1b23-0de9-3842-c2d4e3d7aac0.htm">mpf_init_set_d</a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="/html/3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm#Simultaneous_Float_Init_Assign">Simultaneous Float Init & Assign</a></a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="https://gmplib.org/manual/Simultaneous-Float-Init-_0026-Assign.html#Simultaneous-Float-Init-_0026-Assign">GNU MP - Combined Float Initialization and Assignment</a></a></div></div></div></div><divid="pageFooter"class="pageFooter"></div></body></html>