Newline Constant; Null Constant - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

newline constant

Inserts a carriage return character (
) that generates a blank line in text output generated by
\r
your code. Use
to make space for information that is retrieved by a function or
newline
statement in your code.
Availability: ActionScript 1.0; Flash Lite 1.1
Example
The following example shows how
displays output from the
statement on
newline
trace()
multiple lines.
var myName:String = "Lisa", myAge:Number = 30;
trace(myName+myAge);
trace("-----");
trace(myName+newline+myAge);
// output:
Lisa30
-----
Lisa
30
See also
trace function

null constant

A special value that can be assigned to variables or returned by a function if no data was
provided. You can use
to represent values that are missing or that do not have a defined
null
data type.
Availability: ActionScript 1.0; Flash Lite 1.1
Example
In a numeric context,
evaluates to 0. Equality tests can be performed with
. In this
null
null
statement, a binary tree node has no left child, so the field for its left child could be set to
.
null
if (tree.left == null) {
tree.left = new TreeNode();
}
Constants
29

Advertisement

Table of Contents
loading

Table of Contents