Welcome, guest | Sign In | My Account | Store | Cart

Procedure to write standard report header.

Tcl, 15 lines
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
######################################################
# Proc - write report file header
######################################################
proc reportHeader {reportfile header outputFile} {
   
    set computer_name $::env(COMPUTERNAME)
    set computer_time [clock format [clock seconds] -format "%d-%m-%Y %H.%M.%S"]
    
    puts $reportfile "###################################################################################"
    puts $reportfile "# $header on $computer_name at = $computer_time."   
    puts $reportfile "#                      *****  "
    puts $reportfile [format "%-20s %s" {# Author:} {Patrick Finnegan}]
    puts $reportfile [format "%-20s %s" {# Report File:} $outputFile]
    puts $reportfile "###################################################################################\n"
}
Created by Patrick Finnegan on Sun, 23 Jan 2005 (MIT)
Tcl recipes (162)
Patrick Finnegan's recipes (56)

Required Modules

  • (none specified)

Other Information and Tasks