On-demand variables for conditional with string value and numeric data

Aug 15, 2010 at 5:06 PM
Edited Aug 15, 2010 at 5:30 PM
Hi Eugine,

My approach in using FLEE is by On-demand variables. However during variable type resolution it requires me to specify the type :

static void variables_ResolveVariableType(object sender, ResolveVariableTypeEventArgs e)
{
  // Make all variables Doubles
  e.VariableType = typeof(double);
}

Now since conditional statement supports strings, then this would create problem if we use the following formulas:

if (var1="One", result+1, result+2)

Consider var1 is expected to be a string, result is expected to be a double

Question : How can we dynamically give the e.VariableType during resolution of variable type?
(so that var1 will be automatically identified as a string type and result is identified as double.)

Thanks in advance