Whether the function is valid or not.
/******************************************** * List of stuff that is invalid but crashes: * * Whitespace * Preceding Operators * Invalid Operators and Characters */ dstring func = "(Number,Number)(Number)"d; dstring def = "x1*x2"d; assert(validateFunction(func, def)); func = "(Number,Number,Number)(Number)"d; def = "x1*x2+x3"d; assert(validateFunction(func, def)); def = "(x1"d; assert(!validateFunction(func, def)); def = "(x1)"d; assert(validateFunction(func, def)); def = "x1)"d; assert(!validateFunction(func, def)); def = "x1x2"d; assert(!validateFunction(func, def)); def = "x1+"d; assert(!validateFunction(func, def)); def = "x1*x2"d; func = "(Number,Number)(Number)"d; assert(registerFunction("f"d, func, def)); //Functions within functions were too hard to implement, so we removed them. //def = "x1* f(x1,x2)(Number)"d; //assert(validateFunction(func, def));
Validates a function.