Variables and Types

From SDU
Jump to: navigation, search
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

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>