<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css">
<title>
Gambas Documentation - Conversion Functions
</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../help+en"><img class="flag" alt="Home" border="0" src="../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../cat+en">Up</a>&nbsp;
<a href="component+en">Previous</a>&nbsp;
<a href="datatype+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
Conversion Functions
</h1>
<table class="table" border="0" bordercolor="#000000" cellpadding="4" cellspacing="0">
<tr class="dark"><td valign="top">
<tt><a href="../name/gb.conv+en">GB.Conv</a></tt>
</td><td valign="top">
Converts a <a href="../../def/gambas+en">Gambas</a> value.
</td></tr>
<tr><td valign="top">
<tt><a href="../name/gb.numberfromstring+en">GB.NumberFromString</a></tt>
</td><td valign="top">
Converts a string into a number.
</td></tr>
<tr class="dark"><td valign="top">
<tt><a href="../name/gb.numbertostring+en">GB.NumberToString</a></tt>
</td><td valign="top">
Converts a number into a string.
</td></tr>
<tr><td valign="top">
<tt><a href="../name/gb.convstring+en">GB.ConvString</a></tt>
</td><td valign="top">
Converts a string from one charset to another charset.
</td></tr>
</table>
<p>
<h2>Overview</h2>
<p>
These functions give you access to the <a href="../../def/gambas+en">Gambas</a> conversion functions.
<p>
<ul>
<li><tt><a href="../name/gb.numberfromstring+en">GB.NumberFromString</a></tt> is an equivalent of <a href="../../lang/val+en">Val</a>, <a href="../../lang/hex+en">Hex$</a>, <a href="../../lang/bin+en">Bin$</a>, <a href="../../lang/cint+en">CInt</a> or <a href="../../lang/clong+en">CLong</a>.
<li><tt><a href="../name/gb.numbertostring+en">GB.NumberToString</a></tt> is an equivalent of Str or <a href="../../lang/cstr+en">CStr</a>.
<li><tt><a href="../name/gb.convstring+en">GB.ConvString</a></tt> is an equivalent of <a href="../../lang/conv+en">Conv$</a>.
<li><tt><a href="../name/gb.conv+en">GB.Conv</a></tt> is an equivalent of datatype conversion functions: <a href="../../lang/cbool+en">CBool</a>, <a href="../../lang/cint+en">CInt</a>, <a href="../../lang/cstr+en">CStr</a>, <a href="../../lang/cdate+en">CDate</a>...
<p>
</ul>

You should use <tt><a href="../name/gb.numberfromstring+en">GB.NumberFromString</a></tt> and <tt><a href="../name/gb.numbertostring+en">GB.NumberToString</a></tt>
instead of C / C++ library functions if you want your component to be coherent
with the <a href="../../def/gambas+en">Gambas</a> syntax.

</div>
</body>
</html>

