Open bakman23 opened 4 years ago
Hi,
What you can do is to use Utils.GetToken() function instead of GetFunctionArgs(). Here is an example:
string funcName = Utils.GetToken(script, Constants.NEXT_OR_END_ARRAY);
This function doesn't execute the parameters, i.e. it treats them as strings. So you will get next string in the list. Unfortunately you have to call this function multiple times if you want to extract multiple parameters. I am going to create a convenience method to get a list of all args.
Let me know if calling GetToken() multiple times can solve the issue for you. Note that as a separation token you can also use a space if needed.
Best, Vassili
Hello, is it possible to get a function arg by index ?
I would like create an IF function like excel.
IFELSE( [condition] , [if true action] , [if false action] )
the problem is, if I use GetFunctionArgs all args will be interpreted and this exemple "IFELSE( 1 != 1 , 1 / 0 , "ok")" the divided by zero will be catch.
the must will be to test fisrt param, if it return 0 the second param will not be interpreted only the third Exemple `
` I tried to create the GetFunctionArgsIndex and it work with this IFELSE( 1 != 1 , 1 / 0 , "ok") but not with that IFELESE ( functA(x) functB(y) != 0 , 3 - 10 Round( 1 / 0 ) , Ceil(0.4))
`
public static List GetFunctionArgsIndex(ParsingScript script,
char start, char end, Action outList, int indexParam )
{
List args = new List();
bool isList = script.StillValid() && script.Current == Constants.START_GROUP;
pragma warning disable 219
pragma warning restore 219
`
Can you help me, please ?