From b9a06c2ea9761f65f8aa85d86872faef60573e3e Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sat, 29 Jan 2022 23:39:24 -0500 Subject: [EVAL] A few libtnsl fixes --- src/texec/libtnsl.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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 { -- cgit v1.2.3