From 5e99660d092a75beaef2293cf6acee14476b42ca Mon Sep 17 00:00:00 2001 From: Valk Richard Li <48872266+ValKmjolnir@users.noreply.github.com> Date: Sat, 12 Sep 2020 00:03:35 -0700 Subject: [PATCH] update --- version3.0/lib/base.nas | 11 +++++++++-- version3.0/lib/io.nas | 6 ------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/version3.0/lib/base.nas b/version3.0/lib/base.nas index f99e814..4c13b3f 100644 --- a/version3.0/lib/base.nas +++ b/version3.0/lib/base.nas @@ -5,6 +5,13 @@ # before running this file will be translated to abstract syntax tree # and this ast will be linked before main ast as main-ast's beginning +# print +var print=func(elements...) +{ + nasal_call_builtin_std_cout(elements); + return nil; +}; + # append # The first argument specifies a vector. # Appends the remaining arguments to the end of the vector. @@ -19,9 +26,9 @@ var append=func(vector,elements...) # The first argument specifies a vector, the second a number representing the desired size of that vector. # If the vector is currently larger than the specified size,it is truncated. # If it is smaller, it is padded with nil entries.Returns the vector operated upon. -var setsize=func(vector,__size) +var setsize=func(vector,size) { - nasal_call_builtin_set_size(vector,__size); + nasal_call_builtin_set_size(vector,size); return nil; } diff --git a/version3.0/lib/io.nas b/version3.0/lib/io.nas index fc78165..1541824 100644 --- a/version3.0/lib/io.nas +++ b/version3.0/lib/io.nas @@ -65,10 +65,4 @@ var io= { return nasal_call_builtin_builtin_stat(filename); }, -}; - -var print=func(dyn...) -{ - nasal_call_builtin_std_cout(dyn); - return nil; }; \ No newline at end of file