03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Lisa<br />

30<br />

See also<br />

trace function<br />

null constant<br />

A special value that can be assigned to variables or returned by a function if no data was<br />

provided. You can use null to represent values that are missing or that do not have a defined<br />

data type.<br />

Example<br />

In a numeric context, null evaluates to 0. Equality tests can be performed with null. In this<br />

statement, a binary tree node has no left child, so the field for its left child could be set to<br />

null.<br />

if (tree.left == null) {<br />

tree.left = new TreeNode();<br />

}<br />

true constant<br />

A unique Boolean value that represents the opposite of false. When automatic data typing<br />

converts true to a number, it becomes 1; when it converts true to a string, it becomes<br />

"true".<br />

Example<br />

The following example shows the use of true in an if statement:<br />

var shouldExecute:Boolean;<br />

// ...<br />

// code that sets shouldExecute to either true or false goes here<br />

// shouldExecute is set to true for this example:<br />

shouldExecute = true;<br />

if (shouldExecute == true) {<br />

trace("your statements here");<br />

}<br />

// true is also implied, so the if statement could also be written:<br />

// if (shouldExecute) {<br />

// trace("your statements here");<br />

// }<br />

Constants 29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!