to use the var statement, you probably want to for such things as loop
counters and other local variables.
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/udfs12.htm
<http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/udfs12.htm>
HTH
--Nathan
________________________________
From: Jim McAtee [mailto:[EMAIL PROTECTED]
Sent: Friday, May 07, 2004 1:33 PM
To: CF-Talk
Subject: cfscript question
If the declaration of variables using var within cfscript isn't
necessary,
what kind of variables are being created? Are they in the
variables
scope?
For example, the variables 'sdatefmt' and 'edatefmt' in the cf
function
shown below:
function DateRangeFormat(sdate, edate, mask, divider) {
if (IsDate(sdate)) sdatefmt = DateFormat(sdate, mask); else
sdate = "";
if (IsDate(edate)) edatefmt = DateFormat(edate, mask); else
edate = "";
if (Len(sdatefmt) and Len(edatefmt) and (sdatefmt is not
edatefmt))
return sdatefmt & " " & divider & " " & edatefmt;
else if (Len(sdatefmt)) return sdatefmt;
else if (Len(edatefmt)) return edatefmt;
else return "";
}
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]