function operand(name, num, settings)
{
    settings = extend(
        {
            'variable': name,
            'default':  [],
            'help':     '',
            'action':   function() {}
        },
        settings
    );

    if (parseFloat(num) == parseInt(num) && !isNaN(num) && num > 0) {
        this.num = parseInt(num);
    } else if (num === '?' || num === '*' || num === '+') {
        this.num = num;
    } else {
        throw 'either an integer > 0 or one of the characters \'?\', \'*\' or \'+\' are required as second parameter. Input was: ' + num;
    }

    this.name = name;
    this.settings = settings;

    this.index = 0;
    this.data = settings.default;
    this.validators = [];
}
/**
 * Constructor.
 *
 * @param   string          name            Internal name of operand.
 * @param   int|string      num             Number of arguments.
 * @param   object          settings        Optional additional settings.
 */
Constructor.
@param   string          name            Internal name of operand.
@param   int|string      num             Number of arguments.
@param   object          settings        Optional additional settings.
Constructor . @param string name Internal name of operand . @param int|string num Number of arguments . @param object settings Optional additional settings .
function operand(name, num, settings)
{
    settings = extend(
        {
            'variable': name,
            'default':  [],
            'help':     '',
            'action':   function() {}
        },
        settings
    );
    if (parseFloat(num) == parseInt(num) && !isNaN(num) && num > 0) {
        this.num = parseInt(num);
    } else if (num === '?' || num === '*' || num === '+') {
        this.num = num;
    } else {
        throw 'either an integer > 0 or one of the characters \'?\', \'*\' or \'+\' are required as second parameter. Input was: ' + num;
    }
    this.name = name;
    this.settings = settings;
    this.index = 0;
    this.data = settings.default;
    this.validators = [];
}
function operand ( name , num , settings ) { settings = extend ( { 'variable' : name , 'default' : [ ] , 'help' : '' , 'action' : function ( ) { } } , settings ) ; if ( parseFloat ( num ) == parseInt ( num ) && ! isNaN ( num ) && num > 0 ) { this . num = parseInt ( num ) ; } else if ( num === '?' || num === '*' || num === '+' ) { this . num = num ; } else { throw 'either an integer > 0 or one of the characters \'?\', \'*\' or \'+\' are required as second parameter. Input was: ' + num ; } this . name = name ; this . settings = settings ; this . index = 0 ; this . data = settings . default ; this . validators = [ ] ; }
Constructor.
Constructor .