public override void getString(StringBuilder buf) { buf.Append(function.getName(settings)); buf.Append('('); if (arguments > 0) { ParseItem[] operands = getOperands(); if (readFromSheet) { // arguments are in the same order they were specified operands[0].getString(buf); for (int i = 1; i < arguments; i++) { buf.Append(','); operands[i].getString(buf); } } else { // arguments are stored in the reverse order to which they // were specified, so iterate through them backwards operands[arguments - 1].getString(buf); for (int i = arguments - 2; i >= 0; i--) { buf.Append(','); operands[i].getString(buf); } } } buf.Append(')'); }
/** * Gets the string for this functions * * @param buf the buffer to append */ public override void getString(StringBuilder buf) { buf.Append(function.getName(settings)); buf.Append('('); int numArgs = function.getNumArgs(); if (numArgs > 0) { ParseItem[] operands = getOperands(); // arguments are in the same order they were specified operands[0].getString(buf); for (int i = 1; i < numArgs; i++) { buf.Append(','); operands[i].getString(buf); } } buf.Append(')'); }