Files
harbour-core/harbour/contrib/hbclipsm/tests/tststack.prg
Viktor Szakats f2480e5443 2007-12-01 02:34 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/make_b32_all.bat
   * contrib/make_vc_all.bat
   * contrib/Makefile
   - contrib/msql
   + contrib/hbmsql
   * contrib/hbmsql/common.mak
   * contrib/hbmsql/Makefile
   - contrib/libmisc
   + contrib/hbmisc
   - contrib/mysql
   + contrib/hbmysql
   - contrib/odbc
   + contrib/hbodbc
   - contrib/ole
   + contrib/hbole
   - contrib/pgsql
   + contrib/hbpgsql
   * contrib/hbpgsql/common.mak
   * contrib/hbpgsql/Makefile
   - contrib/samples
   + contrib/hbclipsm
   * contrib/hbclipsm/common.mak
   * contrib/hbclipsm/Makefile
2007-12-01 01:34:59 +00:00

27 lines
547 B
Plaintext

/*
* $Id$
*/
function Test()
LOCAL a := StackNew()
? Valtype( a )
? Len( a ) // 0
StackPush( a, "POWER" )
? Len( a ) // 1
StackPush( a, "HARBOUR" )
? Len( a ) // 2
? StackPop( a ) // HARBOUR
? Len( a ) // 1
? StackPop( a ) // POWER
? Len( a ) // 0
? StackPop( a ) // NIL
? Len( a ) // 0
? StackIsEmpty( a ) // TRUE
StackPush( a, "HARBOUR" )
? StackTop( a ) // HARBOUR
? StackIsEmpty( a ) // FALSE
return nil