ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
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 384 of file class.EvalMath.php.

Member Function Documentation

◆ last()

EvalMathStack::last (   $n = 1)

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

References $n.

402  {
403  return $this->stack[$this->count-$n];
404  }
$n
Definition: RandomTest.php:80

◆ pop()

EvalMathStack::pop ( )

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

394  {
395  if ($this->count > 0) {
396  $this->count--;
397  return $this->stack[$this->count];
398  }
399  return null;
400  }

◆ push()

EvalMathStack::push (   $val)

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

389  {
390  $this->stack[$this->count] = $val;
391  $this->count++;
392  }

Field Documentation

◆ $count

EvalMathStack::$count = 0

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

◆ $stack

EvalMathStack::$stack = array()

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


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