User Guide

Syntax 71
Casting to String from an instance of the Date class returns a string representation of the date
that the instance contains. For example, the following example returns a string representation
of the Date class instance (the output shows result for Pacific Daylight Time):
var myDate:Date = new Date(2005,6,1);
trace(String(myDate)); // Fri Jul 1 00:00:00 GMT-0700 2005
The following table summarizes the results of casting to the String data type from other data
types.
Syntax
The syntax of a language defines a set of rules that must be followed when writing executable
code.
Case sensitivity
ActionScript 3.0 is a case-sensitive language. Identifiers that differ only in case are considered
different identifiers. For example, the following code creates two different variables:
var num1:int;
var Num1:int;
Dot syntax
The dot operator (.) provides a way to access the properties and methods of an object. Using
dot syntax, you can refer to a class property or method using an instance name, followed by
the dot operator and name of the property or method. For example, consider the following
class definition:
class DotExample
{
public var prop1:String;
Data type or value Result of conversion to string
Array A string comprising all array elements.
Boolean "true" or "false"
Date A string representation of the Date object.
null "null"
Number, int or uint A string representation of the number.
Object If the instance is null,
"null"; otherwise, "[object Object]”.