代码之家  ›  专栏  ›  技术社区  ›  Vadim

我可以使用C 4作为脚本语言吗?

  •  0
  • Vadim  · 技术社区  · 15 年前

    在我的一个C应用程序中,我使用Ironpython作为脚本语言。看起来像这样:

    string scriptCode = "20 * 5";
    ScriptEngine engine = Python.CreateEngine();
    ScriptSource source =
      engine.CreateScriptSourceFromString(scriptCode , SourceCodeKind.Expression);
    Console.WriteLine(source.Execute<int>());
    

    我能用C 4.0做类似的事情吗?我可以用C代替Ironpython作为脚本语言吗?

    2 回复  |  直到 15 年前
        1
  •  2
  •   Jon Skeet    15 年前

    不-反正不是开箱即用。不管怎么说,目前C本身并没有成为一种脚本语言。C队 are considering that scenario in general though .

    (这篇文章讨论了C在某些场景中已经是一种脚本语言。)

    这个 preceding post 同样重要,顺便说一句。

        2
  •  0
  •   Sebastiaan M    15 年前

    可能是 CS-Script 你在找什么?

    当做,

    塞巴斯蒂安