CFLib.org – Common Function Library Project

Flush(interval)

Last updated April 22, 2003

author

Eric C. Davis

Version: 2 | Requires: CF6 | Library: CFMLLib

Description:
This UDF enables flushing of content during cfscript routines.

Return Values:
Returns nothing.

Example:

<cfscript>
 for (i=1;i LTE 10;i=i+1) {
  WriteOutput("i=" & i & "<br>");
  //Disabled here because of how we run examples...
  //Flush();
 }
</cfscript>

Parameters:

Name Description Required
interval Flushes output each time this number of bytes becomes available. Yes

Full UDF Source:

<!---
 Mimics the CFFLUSH tag and sends all content to the screen.
 Version 2 by RCamden (ray@camdenfamily.com)
 
 @param interval 	 Flushes output each time this number of bytes becomes available. (Required)
 @return Returns nothing. 
 @author Eric C. Davis (cflib@10mar2001.com) 
 @version 2, April 22, 2003 
--->
<cffunction name="flush" returnType="void">
	<cfargument name="interval"  type="numeric" required="false">
	<cfif isDefined("interval")>
		<cfflush interval="#interval#">
	<cfelse>
		<cfflush>
	</cfif>
</cffunction>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson