public bool GetBooleanCellValue() { if (b == BoolType.Null) { b = BoolTypeEx.Parse(str); } return(b.IsTrue()); }
private void executeBranch(Environment env) { if (BoolType.IsTrue(env.DataStack.Pop())) { TrueBranchWord.Execute(env); } else { FalseBranchWord.Execute(env); } }
protected override bool BeforeEachCycleAction(Environment env) { WhileTestWord.Execute(env); if (env.IsExitMode) { return(false); } return(BoolType.IsTrue(env.DataStack.Pop())); }
private void doExit(Environment env) { if (!ReadsFlag || BoolType.IsTrue(env.DataStack.Pop())) { if (BeforeAction != null) { BeforeAction(env); } env.ActiveExitWordName = Name; } }
public bool IsModified() { if (modified == BoolType.Null) { FileInfo file = new FileInfo(fullPath); FileInfo metafile = new FileInfo(fullPath + ".meta"); if (metafile.Exists) { string newMetaHash = GetMetaDigest(metafile); modified = modified.Or(metaHash != newMetaHash); metaHash = newMetaHash; } else { metaHash = string.Empty; } if (!modified.IsTrue() && timestamp == file.LastWriteTimeUtc.Ticks) { // fast check modified = BoolType.False; } else { timestamp = file.LastWriteTimeUtc.Ticks; using (var s = file.Open(FileMode.Open, FileAccess.Read)) { string newAssetHash = s.ComputeHash(); modified = modified.Or(assetHash != newAssetHash); assetHash = newAssetHash; } } } if (modified.IsTrue()) { version++; } return(modified.IsTrue()); }