本文整理汇总了C#中Shelisp.Eval方法的典型用法代码示例。如果您正苦于以下问题:C# Shelisp.Eval方法的具体用法?C# Shelisp.Eval怎么用?C# Shelisp.Eval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shelisp
的用法示例。
在下文中一共展示了Shelisp.Eval方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Fprog1
public static Shelisp.Object Fprog1(L l, Shelisp.Object form1, params Shelisp.Object[] forms)
{
Shelisp.Object rv = form1.Eval(l);
for (int i = 0; i < forms.Length; i ++)
forms[i].Eval(l);
return rv;
}
示例2: Fif
public static Shelisp.Object Fif(L l, Shelisp.Object condition, Shelisp.Object then_form, params Shelisp.Object[] else_forms)
{
if (!L.NILP(condition.Eval(l))) {
return then_form.Eval(l);
}
else {
Shelisp.Object rv = L.Qnil;
for (int i = 0; i < else_forms.Length; i ++)
rv = else_forms[i].Eval(l);
return rv;
}
}
示例3: That
public static AssertResult That(Shelisp.Object o, Signals signals, string lisp_error, string description = null)
{
try {
o.Eval (TestRunner.L);
return FailExpectedLispError (lisp_error, description);
}
catch (LispException le) {
if (le.Symbol == L.intern (lisp_error))
return Succeed (description);
else
return FailExpectedLispError (lisp_error, le, description);
}
catch (Exception e) {
return FailException (e, description);
}
}
示例4: Fwhile
public static Shelisp.Object Fwhile(L l, Shelisp.Object condition, params Shelisp.Object[] forms)
{
while (!L.NILP (condition.Eval (l))) {
for (int i = 0; i < forms.Length; i ++)
forms[i].Eval(l);
}
return L.Qnil;
}