<!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 - DIM
</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="../lang+en">Up</a>&nbsp;
<a href="dfree+en">Previous</a>&nbsp;
<a href="dir+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
DIM
</h1>
This keyword is used for declaring local variables.
<p>
All DIM declarations must be in the <a href="function+en">FUNCTION</a> or <a href="sub+en">SUB</a> before the first executable command.
<p>
<div class="gray"><font size="-2"><b>Example</b></font></div>
<pre class="example">DIM fTimeDiff2 AS Float
DIM iTest AS Integer
DIM iK[9] AS Integer ' ik[0] to ik[8]
DIM shX[3,3] AS Short
DIM date1 AS Date

iTest = 8</pre>
<p>
<hr><b>See also</b><br>
<a href="localdecl+en">Local Variable Declaration</a>&nbsp; <a href="../doc/naming+en">Naming Conventions</a>&nbsp;

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

