From 8d6f96b99ab2b08023703ef8fdcaee0be707c6ff Mon Sep 17 00:00:00 2001 From: ninemine <1371605831@qq.com> Date: Thu, 16 Oct 2025 11:29:50 +0800 Subject: [PATCH] Save --- Convention/[FLEE] | 2 +- [Test]/Program.cs | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Convention/[FLEE] b/Convention/[FLEE] index 9082898..47b12f4 160000 --- a/Convention/[FLEE] +++ b/Convention/[FLEE] @@ -1 +1 @@ -Subproject commit 90828989ad314808989605a159cb47d142b040d2 +Subproject commit 47b12f4bc0b0ff9ad9be0ba07268e7a497f4c330 diff --git a/[Test]/Program.cs b/[Test]/Program.cs index b3adf1e..7f47b3e 100644 --- a/[Test]/Program.cs +++ b/[Test]/Program.cs @@ -3,25 +3,35 @@ using System; public class Program { + static class Test + { + public static object Func(object x) + { + Console.WriteLine(x); + return x; + } + } + static void Main(string[] args) { RScriptEngine engine = new(); RScriptImportClass import = new() { typeof(Math), - + typeof(ExpressionMath), + typeof(Test) }; - import.Add(typeof(ExpressionMath)); var result = engine.Run(@" int i; -i = 2.2; +i = 2; label(test); goto(true,func1); goto(100>i,test); namespace(func1) { - i = Pow(i,2.0); + i = Pow(i,2); + Func(i); } ", import); Console.WriteLine($"Script executed successfully. Result: {result["i"].data}");