ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 395 of file class.EvalMath.php.

Member Function Documentation

◆ last()

EvalMathStack::last (   $n = 1)

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

References $n.

413  {
414  return $this->stack[$this->count-$n];
415  }
$n
Definition: RandomTest.php:80

◆ pop()

EvalMathStack::pop ( )

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

405  {
406  if ($this->count > 0) {
407  $this->count--;
408  return $this->stack[$this->count];
409  }
410  return null;
411  }

◆ push()

EvalMathStack::push (   $val)

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

400  {
401  $this->stack[$this->count] = $val;
402  $this->count++;
403  }

Field Documentation

◆ $count

EvalMathStack::$count = 0

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

◆ $stack

EvalMathStack::$stack = array()

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


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