本文整理匯總了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));
}
}