Running the macro CSreplace_T in QM works fine, but after compiling it into an EXE, the following error occurs.
Warning (RT) in <open "CSreplace /41">CSreplace: script empty. <help #IDP_OPT>?
Error (RT) in <open "CSreplace /41">CSreplace: 0x80131600,
Public class not found. <help #IDP_ERR>?
Is there any way to resolve this issue?
Thanks in advance for any suggestions and help.
Function CSreplace_T
Function CSreplace
Using the above approach to create C# functions is very concise. For example:
many `using` directives can be omitted, there's no need to create a class, function modifiers can be left out, and so on.
However, the only issue is that generating an `.exe` results in an error. I noticed the following in the help documentation:
1. When the `code` variable is empty, the code after `#ret` is used automatically.
2. The `csscript` class supports `.exe`.
Warning (RT) in <open "CSreplace /41">CSreplace: script empty. <help #IDP_OPT>?
Error (RT) in <open "CSreplace /41">CSreplace: 0x80131600,
Public class not found. <help #IDP_ERR>?
Is there any way to resolve this issue?
Thanks in advance for any suggestions and help.
Function CSreplace_T
Function CSreplace
function~ str's str'p str't
str code
ret CsFunc(code s p t)
#ret
using System.Text.RegularExpressions;
string replace(string s, string p, string t)
{
,Regex rx = new Regex(p);
,return Regex.Replace(s, p, t);
}
Using the above approach to create C# functions is very concise. For example:
many `using` directives can be omitted, there's no need to create a class, function modifiers can be left out, and so on.
However, the only issue is that generating an `.exe` results in an error. I noticed the following in the help documentation:
1. When the `code` variable is empty, the code after `#ret` is used automatically.
2. The `csscript` class supports `.exe`.