您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

26 行
579 B

using System;
using System.Collections.Generic;
using System.Text;
namespace SuperBASIC.Functions
{
public class Goto : IFunction
{
public float Apply(List<BasicNumber> arguments)
{
// Substract its own arity +1
arguments[0].runtime.pc = (int)arguments[0] - 2;
return arguments[0].runtime.register;
}
}
public class JumpZero : IFunction
{
public float Apply(List<BasicNumber> arguments)
{
if(arguments[0] == 0)
// Substract its own arity +1
arguments[1].runtime.pc = (int)arguments[1] - 3;
return arguments[0].runtime.register;
}
}
}