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]

Reply via email to