Menu

[r3]: / cmp / PkgLib / Interp.tcl  Maximize  Restore  History

Download this file

61 lines (49 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
##
## Compiler2 - PkgLib - Interp
##
## (C) IPN - Ingenieurbuero fuer Praezisionsnumerik
##
## Dipl.-Ing. Andreas Otto
## Ulmenstrasse 3
## D-34289 Zierenberg
## mailto:aotto@t-online.de
## http://tclcompiler.sourceforge.net
##
## Alle Rechte vorbehalten
##
namespace eval ::PkgLib::Interp {
variable Itp
}
##
## -----------------------------------------------------------------
##
proc ::PkgLib::Interp::Create {} {
variable Itp [ interp create -safe ]
interp expose $Itp file
interp alias $Itp EnvGet {} ::Env::LookUp
interp alias $Itp COMPILER_HOME {} ::Env::COMPILER_HOME
}
proc ::PkgLib::Interp::Delete {} {
variable Itp ; ## the interp to use
catch { interp delete $Itp }
}
##
## -----------------------------------------------------------------
##
proc ::PkgLib::Interp::UnAlias { T1 } {
variable Itp
if {![ info exists Itp ]} return
interp alias $Itp $T1 {}
}
proc ::PkgLib::Interp::Alias {T1 args} {
variable Itp
eval interp alias $Itp $T1 \{\} $args
}
proc ::PkgLib::Interp::Source {File} {
variable Itp
interp invokehidden $Itp -global source $File
}
proc ::PkgLib::Interp::Eval { Str } {
variable Itp
interp eval $Itp $Str
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.