TOC PREV NEXT INDEX

 


Prepending Prefix Text


Because the bytecode file is a Tcl script, there might be situations where you might want to add some specialized setup code at the start of the script. For example, if you want to directly execute a script file under Unix it should start with the following lines:


#!/bin/sh
# the next line restarts using protclsh83 \
exec protclsh83 "$0" "$@"

See the manual page for protclsh83 for more information. By default, TclPro Compiler preserves everything from the start of the file to the first non-blank or non-comment line. Therefore in this example, TclPro Compiler adds these three lines to the top of the script it generates.

You can override this default behavior with the prefix option. controls which prefix string is prepended to the output file. Table 9 lists the -prefix options available.

Table 9 TclPro Compiler prefix options 
Type
Function
none
Do not add a prefix string.
auto
Extract the prefix from the input file; everything from the start of the file to the first non-comment line is prepended to the output file. (Default)
tag
Extract the prefix from the input file; everything from the start of the file to the first occurrence of a comment line starting with the text "Tcl::Compiler::Include" is prepended to the output file.
filename
Extract the prefix text from a specified file.

See the procomp.1 manual page for more information.




http://www.ajubasolutions.com
Voice: (650) 210-0100
Fax: (650) 210-0101
support@ajubasolutions.com
TOC PREV NEXT INDEX