diff --git a/src/Runtime/XSharp.VFP/LanguageCoreWrappers.prg b/src/Runtime/XSharp.VFP/LanguageCoreWrappers.prg index 84abd7fbf3..824852271d 100644 --- a/src/Runtime/XSharp.VFP/LanguageCoreWrappers.prg +++ b/src/Runtime/XSharp.VFP/LanguageCoreWrappers.prg @@ -53,7 +53,15 @@ FUNCTION Occurs(uSearch AS STRING, cTarget AS STRING) AS DWORD /// [FoxProFunction("STRTRAN", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION StrTran(uTarget, uSearch, uReplace, uStart, uCount) AS STRING CLIPPER - RETURN XSharp.RT.Functions.StrTran(uTarget, uSearch, uReplace, uStart, uCount) + switch PCount() + case 3 + RETURN XSharp.RT.Functions.StrTran(uTarget, uSearch, uReplace) + case 4 + RETURN XSharp.RT.Functions.StrTran(uTarget, uSearch, uReplace, uStart) + case 5 + RETURN XSharp.RT.Functions.StrTran(uTarget, uSearch, uReplace, uStart, uCount) + end switch + RETURN XSharp.RT.Functions.StrTran(uTarget, uSearch, uReplace) /// [FoxProFunction("VAL", FoxFunctionCategory.MathAndNumeric, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; diff --git a/src/Runtime/XSharp.VFP/MacroWrappers.prg b/src/Runtime/XSharp.VFP/MacroWrappers.prg index ac485e52c7..5a4bf3a9c4 100644 --- a/src/Runtime/XSharp.VFP/MacroWrappers.prg +++ b/src/Runtime/XSharp.VFP/MacroWrappers.prg @@ -15,7 +15,17 @@ FUNCTION Evaluate(cString AS STRING) AS USUAL /// [FoxProFunction("EXECSCRIPT", FoxFunctionCategory.General, FoxEngine.Macro, FoxFunctionStatus.Partial, FoxCriticality.High)]; FUNCTION ExecScript(cExpression, eParameter1, eParameter2, eParameterN) AS USUAL CLIPPER - RETURN XSharp.RT.Functions.ExecScript(cExpression, eParameter1, eParameter2, eParameterN) + switch PCount() + case 1 + RETURN XSharp.RT.Functions.ExecScript(cExpression) + case 2 + RETURN XSharp.RT.Functions.ExecScript(cExpression, eParameter1) + case 3 + RETURN XSharp.RT.Functions.ExecScript(cExpression, eParameter1, eParameter2) + case 4 + RETURN XSharp.RT.Functions.ExecScript(cExpression, eParameter1, eParameter2, eParameterN) + end switch + RETURN XSharp.RT.Functions.ExecScript(cExpression) /// [NeedsAccessToLocals(FALSE)]; diff --git a/src/Runtime/XSharp.VFP/RuntimeCoreWrappers.prg b/src/Runtime/XSharp.VFP/RuntimeCoreWrappers.prg index df15605112..c269d1e2c0 100644 --- a/src/Runtime/XSharp.VFP/RuntimeCoreWrappers.prg +++ b/src/Runtime/XSharp.VFP/RuntimeCoreWrappers.prg @@ -322,5 +322,8 @@ FUNCTION OemToAnsi(cOemString AS STRING) AS STRING /// [FoxProFunction("SET", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; -FUNCTION Set(cSETCommand AS USUAL, newValue AS USUAL) AS USUAL - RETURN XSharp.RT.Functions.Set(cSETCommand, newValue) +FUNCTION Set(cSETCommand, newValue) AS USUAL CLIPPER + IF PCount() > 1 + RETURN XSharp.RT.Functions.Set(cSETCommand, newValue) + ENDIF + RETURN XSharp.RT.Functions.Set(cSETCommand)