1
0

Implement PUSH/POP STR$

This commit is contained in:
otya128
2016-12-17 16:07:03 +09:00
parent ffd8743ed6
commit 5c594daba7
2 changed files with 21 additions and 2 deletions

View File

@@ -2645,7 +2645,10 @@ class BuiltinFunction
switch (ary.type)
{
case ValueType.String:
throw new IllegalFunctionCall("NOTIMPL:PUSH string");
if (ary.stringValue.dimCount != 1)
throw new TypeMismatch("PUSH", 1);
ary.stringValue.push(exp.castString);
break;
case ValueType.IntegerArray:
if (ary.integerArray.dimCount != 1)
throw new TypeMismatch("PUSH", 1);
@@ -2678,7 +2681,9 @@ class BuiltinFunction
switch (ary.type)
{
case ValueType.String:
throw new IllegalFunctionCall("NOTIMPL:POP string");
if (ary.stringValue.dimCount != 1)
throw new TypeMismatch("POP", 1);
return Value(ary.stringValue.pop());
case ValueType.IntegerArray:
if (ary.integerArray.dimCount != 1)
throw new TypeMismatch("POP", 1);