<!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 - GB_CONSTANT
</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="../name+en">Up</a>&nbsp;
<a href="gb_comp_text+en">Previous</a>&nbsp;
<a href="gb_date+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
GB_CONSTANT
</h1>
<div class="black"><font size="-2"><b>Syntax</b></font></div>
<pre class="syntax">#define <b>GB_CONSTANT</b> ( <u>symbol</u> , <u>type</u> , <u>value</u> ) ...</pre><p>

Declares a constant symbol.
<p>
<ul>
<li><u>symbol</u> is the name of the constant.
<li><u>type</u> is the type of the constant.
<li><u>value</u> is the value of the constant.
<p>
</ul>

This table gives more details:
<p>
<table class="table" border="0" bordercolor="#000000" cellpadding="4" cellspacing="0">
<tr><th>
Constant type
</th><th>
How to specify the type
</th><th>
How to specify the value
</th><th>
Example
</th></tr>
<tr class="dark"><td valign="top">
<a href="../../lang/type/integer+en">Integer</a>
</td><td valign="top">
<tt>&quot;i&quot;</tt>
</td><td valign="top">
Directly the integer value
</td><td valign="top">
<tt>GB_CONSTANT(&quot;Constant&quot;, &quot;i&quot;, 1972)</tt>
</td></tr>
<tr><td valign="top">
<a href="../../lang/type/float+en">Float</a>
</td><td valign="top">
<tt>&quot;f&quot;</tt>
</td><td valign="top">
The floating point value as a string
</td><td valign="top">
<tt>GB_CONSTANT(&quot;Constant&quot;, &quot;f&quot;, &quot;3.1416&quot;)</tt>
</td></tr>
<tr class="dark"><td valign="top">
<a href="../../comp/gb/string+en">String</a>
</td><td valign="top">
<tt>&quot;s&quot;</tt>
</td><td valign="top">
The string, between double quotes
</td><td valign="top">
<tt>GB_CONSTANT(&quot;Constant&quot;, &quot;s&quot;, &quot;Gambas&quot;)</tt>
</td></tr>
</table>
<p>
<hr><b>See also</b><br>
<a href="../cat/desc+en">Class Description</a>&nbsp;

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

