From d162f6dc1f545a82b77bf4588f57085aadd55d8c Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Sun, 27 Nov 2022 15:42:49 -0600 Subject: [PATCH] rshift --- AST.cs | 2 +- code/app.bs | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/AST.cs b/AST.cs index fdef6a3..97f6dcb 100644 --- a/AST.cs +++ b/AST.cs @@ -1019,7 +1019,7 @@ namespace langtest { if(expressions.Count < 2) throw new Exception("need two param"); return expressions[0].Evaluate(state) << (int) expressions[1].Evaluate(state); - }else if(name == "rshit") + }else if(name == "rshift") { if(expressions.Count < 2) throw new Exception("need two param"); return expressions[0].Evaluate(state) >> (int) expressions[1].Evaluate(state); diff --git a/code/app.bs b/code/app.bs index d6d64fd..26dd1d8 100644 --- a/code/app.bs +++ b/code/app.bs @@ -1,5 +1,12 @@ -res=string_split_chr("Demi,Lovato,Tom,Joel",','); -j=0; -for(j,box_len(res),j+1,{ - box_println(box_getvalue(res,j)); -}); \ No newline at end of file +j=4; +create_function(joel,a,b,{ + e2=42; + { + e=42; + printint(e2); + }; + printint(e2); + printint(j); +}); +joel(4,4); +printint(e); \ No newline at end of file