This document lists corrections, additions, and other changes that were made after release of the ColdFusion 4.0 document set.
See the ColdFusion 4.0 Release Notes for a listing of known issues and upgrade changes.
See the New Features document for information about using the new features enabled for this release.
See the Securing the ColdFusion Administrator document for information about configuring secure access to the ColdFusion Administrator.
colfusion35.so
should be coldfusion35.so.
CFLOOP
tag should precede the TABLE
tag. ATTACHMENTPATH
attribute to choose where the attachment files go. It is the developer's responsibility to manage these files so they can be accessed unambiguously.CFPOP
tag."USERNAME, PASSWORD, and SERVER
as required attributes of ACTION="Close"
. However, specifying these attributes will cause an error if you have enabled strict validation. The listing is correct in the CFML Language Reference.CFTABLE
discussion in the print version of the CFML Language Reference has the following mistakes:
BORDER
attribute is standalone; it has no associated value.COLHEADER
attribute is missing. COLHEADER
, which is also standalone, displays headers for each column, as specified in the CFCOL
tags.GetTempDirectory
function incorrectly states that it returns the value of the TEMP or TMP environment variables. In some cases, GetTempDirectory
returns the path of the installed operating system for Windows NT. What GetTempDirectory
returns depends on the account under which ColdFusion is running as well as a variety of other factors. The best way to determine what it returns is to evaluate the function programmatically. OLEDB
option for the DBTYPE
attribute is not covered in the Language Reference discussions of the CFGRIDUPDATE, CFINSERT, CFQUERY, and CFUPDATE
tags.CurrentDate
function can be used within the CFINSERT
and CFUPDATE
CFML tags. For example, you can add a date column for when a record is added to the database. You could add a CurrentDate
column to the database, then add a hidden form field to the entry form:
<INPUT TYPE="Hidden" NAME="CurrentDate" VALUE="CurrentDate()">
The CurrentDate
function differs from the Now function in several ways:
Now
function needs to be enclosed in # signs.The Now
function must have <CFOUTPUT></CFOUTPUT> around the form field.
The Now
function adds the date and time to the database, while the CurrentDate
function adds only the date.
The comparable Now
syntax is:
<CFOUTPUT> <INPUT TYPE="Hidden" NAME="CurrentDate" VALUE="#Now()#"> </CFOUTPUT>
CFLOOP
has been modified to reduce the occurrence of a problem in programming languages that has to do with the internal representation of floating point numbers. Programmers think they are working with decimal numbers, but in fact all floating point numbers are represented in binary notation as some form of binary fractional numbers. Some numbers, e.g., 0.1 do not have an exact representation in binary. Therefore, when some arithmetic operations are performed on them cumulative error is added. The following code in CFML illustrates the problem:
<CFSET result = (1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1) eq 2>The variable result is equal to "No" instead of the expected "Yes". The problem, however, cannot be entirely eliminated.
The GetBaseTemplatePath
function returns the fully specified path of the base template. This function supercedes the GetTemplatePath
function, which is deprecated in ColdFusion Version 4.0.
See also FileExists, and ExpandPath.
SyntaxGetBaseTemplatePath()Examples
<!--- This example uses GetBaseTemplatePath to show the template path of the current page ---> <HTML> <HEAD> <TITLE>GetBaseTemplatePath Example</TITLE> </HEAD> <BODY> <H3>GetBaseTemplatePath Example</H3> <P>The template path of the current page is: <CFOUTPUT>#GetBaseTemplatePath()#</CFOUTPUT> </BODY> </HTML>
GetCurrentTemplatePath
returns the fully specified path of the template containing this function, regardless of whether it's a standalone template or it's included via a CFINCLUDE
tag.
See also FileExists, and ExpandPath.
SyntaxGetCurrentTemplatePath()Examples
<!--- This example uses GetCurrentTemplatePath to show the template path of any page (even those included via CFINCLUDE)---> <HTML> <HEAD> <TITLE>GetCurrentTemplatePath Example</TITLE> </HEAD> <BODY> <H3>GetCurrentTemplatePath Example</H3> <P>The template path of the current page is: <CFOUTPUT>#GetCurrentTemplatePath()#</CFOUTPUT> </BODY> </HTML>
The ACos
function returns the arccosine of a number. The arccosine is the angle whose cosine is number. Note that number must be between -1 and 1.
ACos(number)
number - cosine of the angle you want.
UsageThe range of the result is 0 to Pi() radians. To convert degrees to radians, multiply degrees by Pi()/180. To convert radians to degrees, multiply radians by 180/Pi().
ExamplesSample Code | Result |
ACos(0) | 1.57079632679 |
ACos(0)*180/PI() | 90 |
The ASin
function returns the arcsine of a number. The arcsine is the angle whose sine is number.
Note that number must be between -1 and 1.
ASin(number)
number - sine of the angle you want.
Usage
The range of the result is -Pi()/2 to Pi()/2 radians. To convert degrees to radians, multiply degrees by Pi()/180. To convert radians to degrees, multiply radians by 180/Pi().
Examples
Sample Code | Result |
ASin(1) | 1.57079632679 |
ASin(1)*180/PI() | 90 |