Steve Bennett wrote:
>
> As it stands, this is the only option if you build from trunk.
> Joe, any docs?
>
As far as I know, there are not any formal docs on the extra TH1 commands
exposed by Fossil yet. However, the ones involving Tcl integration are
fairly straightforward and do have associated tests, which demonstrate
their usage. Examples:
1. The "tclInvoke" command invokes a Tcl command with the exact arguments
it is given:
tclInvoke set test "this is a test."; # sets Tcl variable $test
2. The "tclEval" command works just like the Tcl "eval" command:
tclEval {
# emit current date/time to stdout
puts stdout [clock format [clock seconds]]
}
3. The "tclExpr" command works just like the Tcl "expr" command:
tclExpr {2 ** 2}; # returns 4 in Tcl 8.5+
In addition to the TH1 commands above, the Tcl integration features of
Fossil also allow Tcl to call back into TH1:
1. The "th1Eval" evaluates an arbitrary TH1 script from Tcl:
# The "tclInvoke" TH1 command is used here to "hop" over to Tcl
# while preserving argument grouping.
tclInvoke th1Eval {set y "two words"}; # sets TH1 variable $y
2. The "th1Expr" evaluates an arbitrary TH1 expression from Tcl:
# The "tclInvoke" TH1 command is used here to "hop" over to Tcl
# while preserving argument grouping.
tclInvoke th1Expr {2 + 2}
--
Joe Mistachkin
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users