Compiling Your Code
TclPro Compiler compiles Tcl files, and after compiling, creates an output file with the .tbc extension. To compile a Tcl script, enter:
C:> procomp filename.tcl
This command creates the output file filename.tbc.
You can specify multiple file names on the command line; the bytecode files will have the same names as the input file with extension .tbc. You can also use wildcard specifications in the file names following the glob conventions. For example: to compile all .tcl files in C:\dir1, type:
C:> procomp c:\dir1\*.tcl
When a file is compiled, the output file is placed in the same directory as the input file, with the same name, and extension .tbc.
To rename a file while compiling it, use the out flag to create a single file with a custom name. You specify the command in the form: procomp -out newfilename oldfilename, for example: to rename foo.tcl to bar.tst, you would type:
C:> procomp -out bar.tst foo.tcl
The -out flag can also specify a directory, for example: the following command:
C:> procomp -out c:\dir2 c:\dir1\*.tcl
generates the set of files with the same name with the .tbc extension, but the files are placed in C\:dir2.
Note: You can only specify a single input if the -out flag does not specify a directory.
You can also force TclPro Compiler to overwrite all output files that already exist using the -force flag. This flag deletes the output file before running TclPro Compiler to ensure that the compilation does not fail because of permission errors. Because TclPro Compiler creates the output file with the same permissions as the input file, the .tbc file generated from a read-only .tcl file is also read-only. As a result, recompiling a read-only file will fail unless you specify the -force flag.
http://www.ajubasolutions.com Voice: (650) 210-0100 Fax: (650) 210-0101 support@ajubasolutions.com |