Variables and Types

From SDU
Revision as of 13:59, 18 April 2008 by Prohacx (Talk | contribs)

Jump to: navigation, search

<< back

Declaring variables

<source lang="javascript"> int theInt; long theLong; string theString; object theObject; </source>


Assignment of variables

<source lang="javascript"> int theInt, anotherInt; theInt = 0; anotherInt = 10; </source>


Casting

<source lang="javascript"> string theString; theString = "5"; int theInt; theInt = (int)theString; </source>


NULL

<source lang="javascript"> object theObject; theObject = NULL; </source>