Example

   // ----------------------------------------------------
  // User name (OS): Phil
  // Date and time: 01/18/10, 08:11:52
  // ----------------------------------------------------
  // Method: FRText2Document
  // Description
  // 
  //
  // Parameters
  // ----------------------------------------------------

  //$1 = Footrunner Text
  //{$2} = Optional Path to Footrunner Document, Pass "" to prompt
C_TEXT($1;$ttDocPath;$ttDocContents)
C_TIME($rDoc)
C_LONGINT($0)
$0:=0
$ttDocPath:=""
$ttDocContents:=$1

If (Count parameters>1)
$ttDocPath:=$2
End if 
If (Length($ttDocPath)=0)  // no document specified
$rDoc:=Create document("")
$fGo:=(OK=1)
Else 
If (Test path name($ttDocPath)=Is a document )
DELETE DOCUMENT($ttDocPath)
End if 
$rDoc:=Create document($ttDocPath)
$fGo:=(OK=1)
End if 

If ($fGo)  // no document specified
$0:=FRAppendChecksum ($ttDocContents)
SEND PACKET($rDoc;$ttDocContents)
CLOSE DOCUMENT($rDoc)
End if