[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'Contnrs' (#fcl)

# TObjectStack.Push

Push an object on the stack.

## Declaration

Source position: contnrs.pp line 160

`public function TObjectStack.Push(`
`AObject: TObject`
`):TObject;`

## Arguments

`AObject` |  | The object instance to push on the stack.

## Function result

The element pushed on the stack.

## Description

Push pushes another object on the stack. It overrides the Push method as implemented in TStack so it accepts only objects as arguments.

## Errors

If not enough memory is available to expand the stack, an exception may be raised.

## See also

TObjectStack.Pop |  | Pop the top object of the stack.
TObjectStack.Peek |  | Look at the top object in the stack.

Documentation generated on: May 14 2021