Files
harbour-core/tests/cblock.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

49 lines
768 B
Plaintext

PROCEDURE Main()
LOCAL i, bBlock[ 3 ]
MEMVAR m_Var1, m_Var2, m_Var3, m_Macro
PRIVATE m_Var1, m_Var2, m_Var3, m_Macro
m_Var1 := "m_Var1"
m_Var2 := "m_Var2"
m_Var3 := "m_Var3"
FOR i := 1 TO 3
m_Macro := "m_Var" + Str( i, 1 )
bBlock[ i ] := {|| &m_Macro }
NEXT
? "Early (Simple):"
FOR i := 1 TO 3
? Eval( bBlock[ i ] )
NEXT
FOR i := 1 TO 3
m_Macro := "m_Var" + Str( i, 1 )
bBlock[ i ] := {|| &m_Macro + "!" }
NEXT
?
? "Early (Complex):"
FOR i := 1 TO 3
? Eval( bBlock[ i ] )
NEXT
FOR i := 1 TO 3
m_Macro := "m_Var" + Str( i, 1 )
bBlock[ i ] := {|| &( m_Macro ) }
NEXT
?
? "Late:"
FOR i := 1 TO 3
? Eval( bBlock[ i ] )
NEXT
RETURN