ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
EvalMathStack Class Reference
+ Collaboration diagram for EvalMathStack:

Public Member Functions

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

Data Fields

 $stack = array()
 
 $count = 0
 

Detailed Description

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

Member Function Documentation

◆ last()

EvalMathStack::last (   $n = 1)

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

406 {
407 return $this->stack[$this->count-$n];
408 }
$n
Definition: RandomTest.php:80

References $n.

◆ pop()

EvalMathStack::pop ( )

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

398 {
399 if ($this->count > 0) {
400 $this->count--;
401 return $this->stack[$this->count];
402 }
403 return null;
404 }

References $count.

◆ push()

EvalMathStack::push (   $val)

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

393 {
394 $this->stack[$this->count] = $val;
395 $this->count++;
396 }

References $count.

Field Documentation

◆ $count

EvalMathStack::$count = 0

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

Referenced by pop(), and push().

◆ $stack

EvalMathStack::$stack = array()

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


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