public static bool TryWhileCILNoDebug(CommandQueue queue, int entry_ind, IntegerTag integer) { WhileCommandData dat = queue.CurrentRunnable.EntryData[entry_ind] as WhileCommandData; integer.Internal = ++dat.Index; return(IfCommand.TryIf(queue, null, new List <Argument>(dat.ComparisonArgs))); }
/// <summary>Executes the callback part of the while command.</summary> /// <param name="queue">The command queue involved.</param> /// <param name="entry">Entry to be executed.</param> /// <param name="integer">While Index holder.</param> public static bool TryWhileCIL(CommandQueue queue, CommandEntry entry, IntegerTag integer) { WhileCommandData dat = queue.CurrentRunnable.EntryData[entry.BlockStart - 1] as WhileCommandData; integer.Internal = ++dat.Index; if (IfCommand.TryIf(queue, entry, new List <Argument>(dat.ComparisonArgs))) { if (entry.ShouldShowGood(queue)) { entry.GoodOutput(queue, "While looping: " + TextStyle.Separate + dat.Index + TextStyle.Base + "..."); } return(true); } if (entry.ShouldShowGood(queue)) { entry.GoodOutput(queue, "While stopping."); } return(false); }