Files
harbour-core/harbour/tests/initexit.prg
Viktor Szakats 007f42f3b1 2012-10-15 03:39 UTC+0200 Viktor Szakats (harbour syenar.net)
- contrib/hbmysql/utils
  - contrib/hbmysql/utils/dbf2mysq.prg
  - contrib/hbmysql/utils/hbmk.hbm
  + contrib/hbmysql/tests/dbf2mysq.prg
    * moved to tests (in sync with hbpgsql)

  * src/rtl/hbi18n2.prg
    ! fixed to use HB_ASCAN() instead of ASCAN() when 5th
      extension parameter is used.

  * src/debug/debugger.prg
  * contrib/hbfbird/tfirebrd.prg
  * contrib/hbnf/clrsel.prg
  * contrib/hbmysql/tmysql.prg
  * contrib/hbmysql/tests/dbf2mysq.prg
  * contrib/hbtip/ftpcli.prg
  * extras/hbdoc/hbdoc.prg
  * extras/hbdoc/tmplates.prg
    ! use HB_ASCAN( x, y,,, .T. ) to avoid relying on _SET_EXACT
    % use ASCAN() instead of HB_ASCAN() if Harbour extension are not used (hbdoc)

  * contrib/gtwvg/tests/modal.prg
    ! use HB_ASCAN( x, y,,, .T. ) to avoid relying on _SET_EXACT
    ! use HB_KEYCHAR() instead of CHR() on key codes

  * contrib/xhb/tedit.prg
  * contrib/xhb/thtm.prg
  * contrib/xhb/xhbole.prg
  * tests/fortest.prg
  * tests/initexit.prg
  * tests/statinit.prg
  * tests/vidtest.prg
  * tests/rddtest/rddtst.prg
  * extras/hbdoc/hbdoc.prg
    * renamed STATIC vars to start with 's_'
    * renamed PUBLIC/PRIVATE vars to start with 'p_'
    * renamed STATIC "const" vars to start with 'sc_'

  * contrib/hbsqlit3/hdbcsqlt.prg
  * contrib/xhb/tedit.prg
    * hbformatted

  * contrib/sddmy/tests/test1.prg
  * contrib/xhb/tcgi.prg
  * contrib/xhb/thtm.prg
  * tests/brwpos.prg
    * formatting
2012-10-15 01:50:24 +00:00

64 lines
1.4 KiB
Plaintext

/*
* $Id$
*/
// Testing Harbour INIT and EXIT functions and initialization
// of static variables
STATIC s_static_var_accessed_in_INIT_function := 10000.15
MEMVAR p_initStatics
PROCEDURE Main()
STATIC s_static_var := "MAIN()"
? "Hello from:", s_static_var
s_static_var_accessed_in_INIT_function++
? "global static=", s_static_var_accessed_in_INIT_function
// Use PUBLIC variable created in INIT PROCEDURE
? "PUBLIC variable created in INIT PROCEDURE=", p_initStatics
RETURN
INIT FUNCTION SecondOne()
STATIC s_static_var := "SECOND()"
? "Hello from:", s_static_var
s_static_var_accessed_in_INIT_function++
? "global static=", s_static_var_accessed_in_INIT_function
RETURN NIL
INIT FUNCTION Third()
STATIC s_static_var := "THIRD()"
? "Hello from:", s_static_var
s_static_var_accessed_in_INIT_function++
? "global static=", s_static_var_accessed_in_INIT_function
RETURN NIL
EXIT FUNCTION Fifth()
STATIC s_static_var := "FIFTH()"
? "Hello from:", s_static_var
s_static_var_accessed_in_INIT_function--
? "global static=", s_static_var_accessed_in_INIT_function
RETURN NIL
EXIT FUNCTION Sixth()
STATIC s_static_var := "SIXTH()"
? "Hello from:", s_static_var
s_static_var_accessed_in_INIT_function--
? "global static=", s_static_var_accessed_in_INIT_function
RETURN NIL
INIT PROCEDURE initStatics()
PUBLIC p_initStatics := "P_INITSTATICS"
RETURN