using System; using System.Collections.Generic; using System.Reflection.Emit; using System.Text; using Sunweaver.Commands.Attributes; using Sunweaver.VM; namespace Sunweaver.Commands { /// /// /// [BasePair("Mod returns the remainder after division. It follows this formula:\n" + "a b div = result\n" + "a b mod = remainder\n\n" + "result * b + remainder = a")] public class mod : Abstracts.BinaryOperation { public override void Operation(long a, long b) { if (b != 0) VM.Stack.Push(a % b); else VM.Stack.Push(a); } public override void CompileOperation(ILGenerator il, Locals locals) { throw new NotImplementedException(); } } }