本文整理汇总了C#中SimpleForth.Forth.SearchVocabularies方法的典型用法代码示例。如果您正苦于以下问题:C# Forth.SearchVocabularies方法的具体用法?C# Forth.SearchVocabularies怎么用?C# Forth.SearchVocabularies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleForth.Forth
的用法示例。
在下文中一共展示了Forth.SearchVocabularies方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Tick
public static void Tick(Forth f)
{
string word = f.getWord(' ');
ForthDictionaryEntry fde = f.SearchVocabularies(word);
if (fde == null) throw new InvalidOperationException("attempt to tick undefined word " + word);
f.dStack.Push(fde.Proc);
}
示例2: BracketTick
public static void BracketTick(Forth f)
{
if (!f.isCompiling) throw new InvalidOperationException("bracket-tick is only valid when compiling");
string word = f.getWord(' ');
ForthDictionaryEntry fde = f.SearchVocabularies(word);
if (fde == null) throw new InvalidOperationException("attempt to bracket-tick undefined word " + word);
f.AppendCode(MakeLiteralOp(fde.Proc));
}
示例3: Postpone
public static void Postpone(Forth f)
{
if (!f.isCompiling) throw new InvalidOperationException("postpone is only valid when compiling");
string word = f.getWord(' ');
ForthDictionaryEntry fde = f.SearchVocabularies(word);
if (fde == null) throw new InvalidOperationException("attempt to postpone undefined word " + word);
if (fde.IsImmediate)
{
f.AppendCode(fde.Proc);
}
else
{
f.AppendCode(MakeLiteralOp(fde.Proc));
f.AppendCode(new ExecutionToken(PopAndAppendCode));
}
}