Files
Convention-CSharp/[Test]/Program.cs

37 lines
594 B
C#
Raw Normal View History

using Convention.RScript;
using Flee.PublicTypes;
using System;
2025-06-13 10:52:21 +08:00
public class Program
{
static void Main(string[] args)
{
RScriptEngine engine = new();
RScriptImportClass import = new()
{
typeof(Math)
};
var result = engine.Run(@"
double i;
i = 2.0;
label(test);
{
2025-10-10 18:01:38 +08:00
goto(true,func1);
goto(100>i,test);
}
double result;
result = i;
goto(true,end);
label(func1);
2025-10-10 18:01:38 +08:00
{
i = Pow(i,2.0);
}
back(true);
2025-10-10 18:01:38 +08:00
label(end);
", import);
Console.WriteLine($"Script executed successfully. Result: {result["result"].data}");
2025-06-13 10:52:21 +08:00
}
}