Specifications
Other changes 25
Operators
Following are changes in operands between ColdFusion 5 and ColdFusion MX:
• Exponent results differ; for example, ColdFusion 5 returns an error for 0^3, and
ColdFusion MX only returns “1”.
• ColdFusion MX supports the dot notation as a dot operator. For example, if your
ColdFusion 5 application has a variable called
last.name, ColdFusion MX reads this
code and creates a struct called
last with a key called name.
In addition, ColdFusion MX does not create keys with dots in them like
ColdFusion 5 does, but instead creates cascading structs with non-dotted names. For
example, ColdFusion 5 interprets
a.b.c="foo" to be a["b.c"]="foo", whereas
ColdFusion MX interprets it to be
a["b"]["c"]="foo".
CFML data types
ColdFusion MX preserves the case of a struct key, whereas ColdFusion 5 sets every struct
key to uppercase. However, you cannot use different case to create more than one key.
For example, the following code produces one key, not two:
x.Foo = 1;
x.FOO = 2;
For best results, use consistent case for struct key names.
COM objects
ColdFusion MX uses the Java Native Interface (JNI) to call COM objects, which results
in slower performance than in ColdFusion 5. How much slower depends on the
application and COM, but in the Macromedia tests of the same code, ColdFusion 5
completed in 50 milliseconds and ColdFusion MX completed in 2-3 seconds.
Templ a te ha n d ler s
The Runtime service in Windows has been re-implemented in ColdFusion MX so that
you can specify a template handler in the ColdFusion Administrator (Settings page). (A
template handler is template to execute when the ColdFusion application server cannot
find a requested template.) However, you must specify a template handler as a path that
is relative to the web root directory, such as \missing.cfm for the file
web_root\missing.cfm. Do not use a full path.
Case in forms
Unlike ColdFusion 5, ColdFusion MX preserves the case of field names submitted by
forms, instead of forcing them to uppercase. Like ColdFusion 5, ColdFusion MX ignores
case when evaluating field names (for example,
#form.myfield# is the same as
#FORM.MYFIELD#). However, you should change templates that use Find() or
ListFind() to search through the Form.Fieldnames variable, to use case-insensitive
equivalents.