summaryrefslogtreecommitdiff
path: root/src/texec/libtnsl.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/texec/libtnsl.go')
-rw-r--r--src/texec/libtnsl.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/texec/libtnsl.go b/src/texec/libtnsl.go
index c0580c7..b810e5f 100644
--- a/src/texec/libtnsl.go
+++ b/src/texec/libtnsl.go
@@ -112,11 +112,19 @@ func tnslFileEval(file, in TVariable, function string) TVariable {
// Generic IO funcs
func tprint(in TVariable) {
- fmt.Printf("%v", in.Data)
+ if equateType(in.Type, tString) {
+ fmt.Print(in.Data.(string))
+ } else {
+ fmt.Print(in.Data)
+ }
}
func tprintln(in TVariable) {
- fmt.Printf("%v\n", in.Data)
+ if equateType(in.Type, tString) {
+ fmt.Println(in.Data.(string))
+ } else {
+ fmt.Println(in.Data)
+ }
}
func topen_file(in TVariable) TVariable {