rshift
This commit is contained in:
parent
0f4064537c
commit
d162f6dc1f
2
AST.cs
2
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);
|
||||
|
|
17
code/app.bs
17
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));
|
||||
});
|
||||
j=4;
|
||||
create_function(joel,a,b,{
|
||||
e2=42;
|
||||
{
|
||||
e=42;
|
||||
printint(e2);
|
||||
};
|
||||
printint(e2);
|
||||
printint(j);
|
||||
});
|
||||
joel(4,4);
|
||||
printint(e);
|
Loading…
Reference in New Issue