Public Member Functions | Data Fields

EvalMathStack Class Reference

Public Member Functions

 push ($val)
 pop ()
 last ($n=1)

Data Fields

 $stack = array()
 $count = 0

Detailed Description

Definition at line 376 of file class.EvalMath.php.


Member Function Documentation

EvalMathStack::last ( n = 1  ) 

Definition at line 394 of file class.EvalMath.php.

                        {
        return $this->stack[$this->count-$n];
    }

EvalMathStack::pop (  ) 

Definition at line 386 of file class.EvalMath.php.

                   {
        if ($this->count > 0) {
            $this->count--;
            return $this->stack[$this->count];
        }
        return null;
    }

EvalMathStack::push ( val  ) 

Definition at line 381 of file class.EvalMath.php.

                        {
        $this->stack[$this->count] = $val;
        $this->count++;
    }


Field Documentation

EvalMathStack::$count = 0

Definition at line 379 of file class.EvalMath.php.

EvalMathStack::$stack = array()

Definition at line 378 of file class.EvalMath.php.


The documentation for this class was generated from the following file: