<!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 - identifier
</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="../def+en">Up</a>&nbsp;
<a href="gnulinux+en">Previous</a>&nbsp;
<a href="invalid+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
identifier
</h1>
An identifier is a sequence of characters used for representing the name of a variable, a class, a method, a property, a constant or an event.
<p>
<ul>
<li>The first character of an identifier must be an alphabetic character, an underscore, or the dollar sign.
<li>The other characters can be any alphabetic character, any digit, an underscore, the dollar sign, or the question mark.
<p>
</ul>

Here are some valid identifiers:
<ul>
<li><tt>A</tt>
<li><tt>i</tt>
<li><tt>Xyz1972</tt>
<li><tt>Null?</tt>
<li><tt>$Global_Var</tt>
<li><tt>_DoNotUse</tt>
<li><tt>Event_Handler</tt>
<p>
</ul>

Some identifiers in <a href="gambas+en">Gambas</a> are reserved keywords, and so cannot be used as variable names.
<p>
To prevent the compiler from interpreting an
identifier as a reserved keyword, put it between braces, like that:
<p>
<pre class="code">DIM {Default} AS String
DIM {Dim} AS Collection
</pre><p>

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

