using uCalcSoftware;

var uc = new uCalc();

static void LogMessage(uCalc.Callback cb) {
   string msg = cb.ArgStr(1);
   // In a real app, this would write to a file or log service.
   Console.WriteLine("[LOG]: " + msg);
}

uc.DefineFunction("Log(message As String)", LogMessage);
uc.Eval("Log('System initialized')");
uc.Eval("Log('User logged in')");