Help Center

CStack.Pushmethod

Appends a variant at the end of the collection.

COMmethodCStack.incdocumented

Syntax

FUNCTION Push (BYREF dv AS DVARIANT) AS HRESULT

Return value

Returns S_OK on success, or an error HRESULT on failure. Error DISP_E_ARRAYISLOCKED: The array is locked.

Description

Appends a variant at the end of the collection.

Example

#INCLUDE ONCE "AfxNova/CStack.inc" USING AfxNova

DIM pStack AS CStack pStack.Push "String 1" pStack.Push "String 2" DIM dv AS DVARIANT dv = pStack.Pop PRINT dv dv = pStack.Pop PRINT dv

' --or--

PRINT pStack.Pop PRINT pStack.Pop

Reference

  • Include file CStack.inc
  • Defined in AfxNova/CStack.inc:75
  • Documented in COM/Stacks and Queues.md
  • Topic: CStack Class