summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-01-29 23:39:24 -0500
committerKyle Gunger <kgunger12@gmail.com>2022-01-29 23:39:24 -0500
commitb9a06c2ea9761f65f8aa85d86872faef60573e3e (patch)
tree6a17cadca87aeadad13ceb5f7113744e0f04096d /src
parentcf2c5f2a7f8dfd7d93362fa6669ee4aecbfad4d0 (diff)
[EVAL] A few libtnsl fixes
Diffstat (limited to 'src')
-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 {