4 .HLL 'Tcl', 'tcl_group'
8 .param pmc argv :slurpy
12 if argc != 1 goto bad_args
14 .local string filename
17 .local string file_contents
18 $P99 = open filename, '<'
20 file_contents = $P99.'slurp'('')
25 ns = interp['namespace';1]
27 .local pmc __script, code
28 __script = get_root_global ['_tcl'], '__script'
29 code = __script ( file_contents, 'ns' => ns, 'bsnl' => 1)
34 $S0 = "couldn't read file \""
36 $S0 .= '": no such file or directory'
40 tcl_error 'wrong # args: should be "source fileName"'
47 # vim: expandtab shiftwidth=4 ft=pir: