stack class
Description
Represents a last-in-first-out collection.
Notes
This class is a standard built-in class in the Rice language.
Instance that is created by declaration have been already initialized.
You can limit the type of the element by using the "{}" in the declaration.
If do not use the "{}" in the declaration, will be able to have an instance of any type as a element.
fitter
| Signature | Description |
| stack() | Get an instance with initial value. |
| stack(string) | Gets an instance initialized by the initialization string. |
| stack{bool}(string) | Gets an instance initialized by the initialization string. |
| stack{int}(string) | Gets an instance initialized by the initialization string. |
| stack{long}(string) | Gets an instance initialized by the initialization string. |
| stack{real}(string) | Gets an instance initialized by the initialization string. |
| stack{string}(string) | Gets an instance initialized by the initialization string. |
getter
setter
This class does not have a setter.
method
| Signature | Description |
| Clear() | Removes all elements from the stack. |
| Copy() | Gets a copy of the caller stack. |
| Peek() | Returns the instance at the top of the stack without removing. |
| Pop() | Removes and returns the instance at the top of the stack. |
| Push(class) | Adds an instance to the top of the stack. |
| Sort(bool) | Gets a new stack that sorted the caller stack. |
| ToList() | Copies the stack elements to a new list. |


