2008-07-28 20:41 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* tests/ainstest.prg
* tests/array16.prg
* tests/arrays.prg
* tests/atest.prg
* tests/clasinit.prg
* tests/classch.prg
* tests/classes.prg
* tests/dates.prg
* tests/db_brows.prg
* tests/ddate.prg
* tests/debugtst.prg
* tests/dynobj.prg
* tests/files.prg
* tests/gfx.prg
* tests/inline.prg
* tests/keywords.prg
* tests/objects.prg
* tests/onidle.prg
* tests/readhrb.prg
* tests/rtfclass.prg
* tests/speed.prg
* tests/switch.prg
* tests/test_all.prg
* tests/testbrw.prg
* tests/testcgi.prg
* tests/testcls.prg
* tests/testget.prg
* tests/testhtml.prg
* tests/testidle.prg
* tests/testinit.prg
* tests/testntx.prg
* tests/testpers.prg
* tests/testrdd2.prg
* tests/teststr.prg
* tests/tstblock.prg
* tests/tstmacro.prg
* tests/videotst.prg
* tests/vidtest.prg
* tests/wcecon.prg
* Cleanups. SVN header, '=' operator usage.
This commit is contained in:
@@ -8,6 +8,48 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-07-28 20:41 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* tests/ainstest.prg
|
||||
* tests/array16.prg
|
||||
* tests/arrays.prg
|
||||
* tests/atest.prg
|
||||
* tests/clasinit.prg
|
||||
* tests/classch.prg
|
||||
* tests/classes.prg
|
||||
* tests/dates.prg
|
||||
* tests/db_brows.prg
|
||||
* tests/ddate.prg
|
||||
* tests/debugtst.prg
|
||||
* tests/dynobj.prg
|
||||
* tests/files.prg
|
||||
* tests/gfx.prg
|
||||
* tests/inline.prg
|
||||
* tests/keywords.prg
|
||||
* tests/objects.prg
|
||||
* tests/onidle.prg
|
||||
* tests/readhrb.prg
|
||||
* tests/rtfclass.prg
|
||||
* tests/speed.prg
|
||||
* tests/switch.prg
|
||||
* tests/test_all.prg
|
||||
* tests/testbrw.prg
|
||||
* tests/testcgi.prg
|
||||
* tests/testcls.prg
|
||||
* tests/testget.prg
|
||||
* tests/testhtml.prg
|
||||
* tests/testidle.prg
|
||||
* tests/testinit.prg
|
||||
* tests/testntx.prg
|
||||
* tests/testpers.prg
|
||||
* tests/testrdd2.prg
|
||||
* tests/teststr.prg
|
||||
* tests/tstblock.prg
|
||||
* tests/tstmacro.prg
|
||||
* tests/videotst.prg
|
||||
* tests/vidtest.prg
|
||||
* tests/wcecon.prg
|
||||
* Cleanups. SVN header, '=' operator usage.
|
||||
|
||||
2008-07-28 18:44 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* debian/changelog
|
||||
* Applied Guy's patch.
|
||||
|
||||
@@ -16,7 +16,7 @@ function Main()
|
||||
|
||||
aFirst := aClone( { 1,2,4 } )
|
||||
aIns( aFirst, 3 )
|
||||
aFirst[3] = "3"
|
||||
aFirst[3] := "3"
|
||||
QQOut( "Testing aIns .. " )
|
||||
aDump( aFirst )
|
||||
|
||||
@@ -28,7 +28,7 @@ function Main()
|
||||
aSecond := { 1,2,4 }
|
||||
aSize( aSecond, 4 )
|
||||
aIns( aSecond, 3 )
|
||||
aSecond[3] = "3"
|
||||
aSecond[3] := "3"
|
||||
QQOut( "Testing aSize + aIns .. " )
|
||||
aDump( aSecond )
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ function Main()
|
||||
|
||||
QOut( ATail( a ) )
|
||||
|
||||
a[ 3 ] = { "this", { "seems", "to", { "work", "so", "well" } } }
|
||||
a[ 3 ] := { "this", { "seems", "to", { "work", "so", "well" } } }
|
||||
QOut( a[ 3 ][ 2 ][ 3 ][ 1 ] ) // "work"
|
||||
|
||||
a[ 3, 2 ][ 3, 1 ] := "Harbour power!" // different ways to specify the indexes
|
||||
@@ -31,7 +31,7 @@ function Main()
|
||||
QOut( ValType( b ) )
|
||||
QOut( Len( b ) )
|
||||
|
||||
b[ 8832 ] = "Harbour"
|
||||
b[ 8832 ] := "Harbour"
|
||||
|
||||
QOut( b[ 8832 ] )
|
||||
|
||||
@@ -40,19 +40,19 @@ function Main()
|
||||
ASize( b, 200 )
|
||||
QOut( Len( b ) )
|
||||
|
||||
b[ 100 ] = 10
|
||||
b[ 100 ] := 10
|
||||
Test( b[ 100 ]++ )
|
||||
QOut( b[ 100 ] )
|
||||
|
||||
b[ 100 ] = 10
|
||||
b[ 100 ] := 10
|
||||
Test( ++b[ 100 ] )
|
||||
QOut( b[ 100 ] )
|
||||
|
||||
b = { 1, { 2, { 4, 5 } } }
|
||||
b := { 1, { 2, { 4, 5 } } }
|
||||
Test( b[ 2 ][ 2 ][ 1 ]++ )
|
||||
QOut( b[ 2 ][ 2 ][ 1 ] )
|
||||
|
||||
b[ 2 ][ 2 ][ 1 ] = 2
|
||||
b[ 2 ][ 2 ][ 1 ] := 2
|
||||
Test( ++b[ 2 ][ 2 ][ 1 ] )
|
||||
QOut( b[ 2 ][ 2 ][ 1 ] )
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ function Main()
|
||||
|
||||
QOut( ATail( a ) )
|
||||
|
||||
a[ 3 ] = { "this", { "seems", "to", { "work", "so", "well" } } }
|
||||
a[ 3 ] := { "this", { "seems", "to", { "work", "so", "well" } } }
|
||||
QOut( a[ 3 ][ 2 ][ 3 ][ 1 ] ) // "work"
|
||||
|
||||
a[ 3, 2 ][ 3, 1 ] := "Harbour power!" // different ways to specify the indexes
|
||||
@@ -31,26 +31,26 @@ function Main()
|
||||
QOut( ValType( b ) )
|
||||
QOut( Len( b ) )
|
||||
|
||||
b[ 8000 ] = "Harbour"
|
||||
b[ 8000 ] := "Harbour"
|
||||
|
||||
QOut( b[ 8000 ] )
|
||||
|
||||
ASize( b, 2000 )
|
||||
QOut( Len( b ) )
|
||||
|
||||
b[ 1000 ] = 10
|
||||
b[ 1000 ] := 10
|
||||
Test( b[ 1000 ]++ )
|
||||
QOut( b[ 1000 ] )
|
||||
|
||||
b[ 1000 ] = 10
|
||||
b[ 1000 ] := 10
|
||||
Test( ++b[ 1000 ] )
|
||||
QOut( b[ 1000 ] )
|
||||
|
||||
b = { 1, { 2, { 4, 5 } } }
|
||||
b := { 1, { 2, { 4, 5 } } }
|
||||
Test( b[ 2 ][ 2 ][ 1 ]++ )
|
||||
QOut( b[ 2 ][ 2 ][ 1 ] )
|
||||
|
||||
b[ 2 ][ 2 ][ 1 ] = 2
|
||||
b[ 2 ][ 2 ][ 1 ] := 2
|
||||
Test( ++b[ 2 ][ 2 ][ 1 ] )
|
||||
QOut( b[ 2 ][ 2 ][ 1 ] )
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ function Main()
|
||||
|
||||
local a := { 1 }
|
||||
|
||||
a[ 1 ] = a
|
||||
a[ 1 ] = nil
|
||||
a[ 1 ] := a
|
||||
a[ 1 ] := nil
|
||||
|
||||
QOut( "The array will try to be released now..." )
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ function TForm()
|
||||
static oClass
|
||||
|
||||
if oClass == nil
|
||||
oClass = HBClass():New( "TFORM" ) // starts a new class definition
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cName" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" , 10 )
|
||||
|
||||
@@ -38,8 +38,8 @@ METHOD New( One, Two ) CLASS TTest
|
||||
|
||||
Super:New()
|
||||
|
||||
::One = One
|
||||
::Two = Two
|
||||
::One := One
|
||||
::Two := Two
|
||||
|
||||
return Self
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ function TForm()
|
||||
static oClass
|
||||
|
||||
if oClass == nil
|
||||
oClass = HBClass():New( "TFORM" ) // starts a new class definition
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cName" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" )
|
||||
@@ -39,10 +39,10 @@ static function New()
|
||||
|
||||
local Self := QSelf()
|
||||
|
||||
::nTop = 10
|
||||
::nLeft = 10
|
||||
::nBottom = 20
|
||||
::nRight = 40
|
||||
::nTop := 10
|
||||
::nLeft := 10
|
||||
::nBottom := 20
|
||||
::nRight := 40
|
||||
|
||||
return Self
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ local cNewLine := HB_OSNewLine()
|
||||
TestCentury(cNewLine)
|
||||
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (cNewLine, "dDate = CToD( '02/04/1999' ) =>", dDate := CToD( "02/04/1999" ))
|
||||
OUTSTD (cNewLine, "dDate := CToD( '02/04/1999' ) =>", dDate := CToD( "02/04/1999" ))
|
||||
|
||||
OUTSTD (cNewLine, "ValType( dDate ) =", ValType( dDate ))
|
||||
|
||||
|
||||
@@ -98,11 +98,11 @@ LOCAL vybkey := 1
|
||||
DO WHILE vybkey <> 0
|
||||
vybkey := DBFLIST(, 3, 1, 76, 20, filename )
|
||||
DO CASE
|
||||
CASE vybkey = 13 // Enter
|
||||
CASE vybkey == 13 // Enter
|
||||
// ...
|
||||
CASE vybkey = - 2 // F3
|
||||
CASE vybkey == - 2 // F3
|
||||
// ...
|
||||
CASE vybkey = - 4 // F5
|
||||
CASE vybkey == - 4 // F5
|
||||
// ...
|
||||
ENDCASE
|
||||
ENDDO
|
||||
@@ -172,7 +172,7 @@ PRIVATE str_bar := "
|
||||
NEXT
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF VALTYPE( LI_MSED ) = "N"
|
||||
IF VALTYPE( LI_MSED ) == "N"
|
||||
predxx := predit := LI_MSED
|
||||
ELSE
|
||||
predxx := predit := IIF( ASCAN( LI_MSED, 3 ) <> 0, 3, IIF( ASCAN( LI_MSED, 2 ) <> 0, 2, 1 ) )
|
||||
@@ -214,7 +214,7 @@ PRIVATE str_bar := "
|
||||
ENDIF
|
||||
WNDVIVOD( mslist )
|
||||
EVAL( LI_BSKIP, mslist, ( LI_NSTR - 1 ) )
|
||||
IF LI_KOLZ = 0 .AND. predit = 3
|
||||
IF LI_KOLZ == 0 .AND. predit == 3
|
||||
LI_NSTR := 0
|
||||
KEYBOARD CHR( 24 )
|
||||
ENDIF
|
||||
@@ -250,25 +250,25 @@ PRIVATE str_bar := "
|
||||
ELSE
|
||||
#ifdef VER_MOUSE
|
||||
xkey := IN_KM( .F. )
|
||||
IF xkey = 502
|
||||
IF xkey == 502
|
||||
DO WHILE M_STAT() <> 0
|
||||
ENDDO
|
||||
xkey := 27
|
||||
ELSEIF xkey = 501
|
||||
ELSEIF xkey == 501
|
||||
ym := M_YTEXT()
|
||||
xm := M_XTEXT()
|
||||
IF ( ym <= LI_Y1 .OR. ym >= LI_Y2 .OR. xm <= LI_X1 .OR. xm >= LI_X2 )
|
||||
IF xm <= LI_X2 .AND. xm >= LI_X1 .AND. ( ym = LI_Y1 .OR. ym = LI_Y2 )
|
||||
IF xm <= LI_X2 .AND. xm >= LI_X1 .AND. ( ym == LI_Y1 .OR. ym == LI_Y2 )
|
||||
M_SHOW()
|
||||
i := SECONDS()
|
||||
DO WHILE SECONDS() - i < 0.05
|
||||
ENDDO
|
||||
KEYBOARD CHR( IIF( ym = LI_Y1, 5, 24 ) )
|
||||
KEYBOARD CHR( IIF( ym == LI_Y1, 5, 24 ) )
|
||||
M_HIDE()
|
||||
LOOP
|
||||
ELSEIF ctrl_ar <> Nil
|
||||
FOR i := 1 TO LEN( ctrl_ar )
|
||||
IF VALTYPE( ctrl_ar[ i ] ) = "C"
|
||||
IF VALTYPE( ctrl_ar[ i ] ) == "C"
|
||||
SETCOLOR( ctrl_ar[ i ] )
|
||||
ELSE
|
||||
rezproc := F_CTRL( ctrl_ar[ i ],,,,,, 1, ym, xm )
|
||||
@@ -292,8 +292,8 @@ PRIVATE str_bar := "
|
||||
VIVSTR( mslist, LI_NSTR + LI_Y1, 0 ) // áâப¨
|
||||
IF xkey < 500
|
||||
DO CASE
|
||||
CASE xkey = 24 // Šãàá®à ¢¨§
|
||||
IF ( LI_KOLZ > 0 .OR. predit = 3 ) .AND. ( LI_KOLZ = 0 .OR. .NOT. EVAL( LI_BEOF, mslist ) )
|
||||
CASE xkey == 24 // Šãàá®à ¢¨§
|
||||
IF ( LI_KOLZ > 0 .OR. predit == 3 ) .AND. ( LI_KOLZ == 0 .OR. .NOT. EVAL( LI_BEOF, mslist ) )
|
||||
EVAL( LI_BSKIP, mslist, 1 )
|
||||
IF EVAL( LI_BEOF, mslist ) .AND. ( predit < 3 .OR. LI_PRFLT )
|
||||
EVAL( LI_BSKIP, mslist, - 1 )
|
||||
@@ -322,19 +322,19 @@ PRIVATE str_bar := "
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
CASE xkey = 5 .AND. LI_KOLZ > 0 // Šãàá®à ¢¢¥àå
|
||||
CASE xkey == 5 .AND. LI_KOLZ > 0 // Šãàá®à ¢¢¥àå
|
||||
EVAL( LI_BSKIP, mslist, - 1 )
|
||||
IF EVAL( LI_BBOF, mslist )
|
||||
EVAL( LI_BGTOP, mslist )
|
||||
ELSE
|
||||
LI_NSTR --
|
||||
IF LI_NSTR = 0
|
||||
IF LI_NSTR == 0
|
||||
LI_NSTR := 1
|
||||
SCROLL( LI_Y1 + 1, LI_X1 + 1, LI_Y2 - 1, LI_X2 - 1, - 1 )
|
||||
VIVSTR( mslist, LI_Y1 + 1, 0 )
|
||||
ENDIF
|
||||
ENDIF
|
||||
CASE xkey = 4 .AND. LI_KOLZ <> 0 // Šãàá®à ¢¯à ¢®
|
||||
CASE xkey == 4 .AND. LI_KOLZ <> 0 // Šãàá®à ¢¯à ¢®
|
||||
IF predit > 1
|
||||
IF LI_COLPOS < LI_NCOLUMNS
|
||||
LI_COLPOS ++
|
||||
@@ -343,7 +343,7 @@ PRIVATE str_bar := "
|
||||
ENDIF
|
||||
IF LI_NCOLUMNS + LI_NLEFT - LI_FREEZE - 1 < LI_COLCOUNT
|
||||
i := LI_NLEFT + LI_NCOLUMNS
|
||||
DO WHILE LI_NCOLUMNS + LI_NLEFT - LI_FREEZE - 1 < LI_COLCOUNT .AND. LI_NLEFT + LI_NCOLUMNS = i
|
||||
DO WHILE LI_NCOLUMNS + LI_NLEFT - LI_FREEZE - 1 < LI_COLCOUNT .AND. LI_NLEFT + LI_NCOLUMNS == i
|
||||
LI_NLEFT ++
|
||||
// DO MSFNEXT WITH mslist,LI_NLEFT
|
||||
LI_NCOLUMNS := FLDCOUNT( mslist, LI_X1 + 2, LI_X2 - 2, LI_NLEFT )
|
||||
@@ -354,7 +354,7 @@ PRIVATE str_bar := "
|
||||
EVAL( LI_BSKIP, mslist, LI_NSTR - 1 )
|
||||
ENDIF
|
||||
VIVNAMES( mslist, LI_NLEFT )
|
||||
CASE xkey = 19 // Šãàá®à ¢«¥¢®
|
||||
CASE xkey == 19 // Šãàá®à ¢«¥¢®
|
||||
IF predit > 1
|
||||
IF LI_COLPOS <> 1
|
||||
LI_COLPOS --
|
||||
@@ -371,14 +371,14 @@ PRIVATE str_bar := "
|
||||
EVAL( LI_BSKIP, mslist, LI_NSTR - 1 )
|
||||
ENDIF
|
||||
VIVNAMES( mslist, LI_NLEFT )
|
||||
CASE xkey = 3 // PgDn
|
||||
CASE xkey == 3 // PgDn
|
||||
EVAL( LI_BSKIP, mslist, razmer - LI_NSTR + 1 )
|
||||
LI_NSTR := 1
|
||||
IF EVAL( LI_BEOF, mslist )
|
||||
EVAL( LI_BSKIP, mslist, - 1 )
|
||||
ENDIF
|
||||
WNDVIVOD( mslist )
|
||||
CASE xkey = 18 // PgUp
|
||||
CASE xkey == 18 // PgUp
|
||||
IF LI_NSTR > 1
|
||||
EVAL( LI_BSKIP, mslist, - ( LI_NSTR - 1 ) )
|
||||
LI_NSTR := 1
|
||||
@@ -389,7 +389,7 @@ PRIVATE str_bar := "
|
||||
ENDIF
|
||||
WNDVIVOD( mslist )
|
||||
ENDIF
|
||||
CASE xkey = 6 .AND. LI_KOLZ > 0 // End
|
||||
CASE xkey == 6 .AND. LI_KOLZ > 0 // End
|
||||
EVAL( LI_BGBOT, mslist )
|
||||
EVAL( LI_BSKIP, mslist, - ( razmer - 1 ) )
|
||||
IF EVAL( LI_BBOF, mslist )
|
||||
@@ -397,21 +397,21 @@ PRIVATE str_bar := "
|
||||
ENDIF
|
||||
LI_NSTR := WNDVIVOD( mslist )
|
||||
EVAL( LI_BSKIP, mslist, LI_NSTR - 1 )
|
||||
CASE xkey = 1 .AND. LI_KOLZ > 0 // Home
|
||||
CASE xkey == 1 .AND. LI_KOLZ > 0 // Home
|
||||
LI_NSTR := 1
|
||||
EVAL( LI_BGTOP, mslist )
|
||||
WNDVIVOD( mslist )
|
||||
CASE xkey = 13 .AND. predit < 2 // Enter
|
||||
CASE xkey == 13 .AND. predit < 2 // Enter
|
||||
rez := .F.
|
||||
rezproc := xkey
|
||||
CASE ( xkey = 13 .OR. ( xkey > 47 .AND. xkey < 58 ) .OR. ( xkey > 64 .AND. xkey < 91 ) ;
|
||||
CASE ( xkey == 13 .OR. ( xkey > 47 .AND. xkey < 58 ) .OR. ( xkey > 64 .AND. xkey < 91 ) ;
|
||||
.OR. ( xkey > 96 .AND. xkey < 123 ) .OR. ( xkey > 127 .AND. xkey < 176 ) .OR. ( xkey > 223 .AND. xkey < 240 ) ) .AND. predit > 1 // Enter
|
||||
// <20>¥¤ ªâ¨à®¢ ¨¥
|
||||
fipos := LI_COLPOS + LI_NLEFT - 1 - LI_FREEZE
|
||||
IF LI_WHEN = Nil .OR. LEN( LI_WHEN ) < fipos .OR. LI_WHEN[ fipos ] = Nil .OR. EVAL( LI_WHEN[ fipos ] )
|
||||
IF LI_WHEN == Nil .OR. LEN( LI_WHEN ) < fipos .OR. LI_WHEN[ fipos ] == Nil .OR. EVAL( LI_WHEN[ fipos ] )
|
||||
IF VALTYPE( LI_MSED ) != "N"
|
||||
vartmp := IIF( LEN( LI_MSED ) < fipos, 1, LI_MSED[ fipos ] )
|
||||
IF VALTYPE( vartmp ) = "N"
|
||||
IF VALTYPE( vartmp ) == "N"
|
||||
IF vartmp <> 2
|
||||
LOOP
|
||||
ENDIF
|
||||
@@ -451,7 +451,7 @@ PRIVATE str_bar := "
|
||||
UNLOCK
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF ( LASTKEY() = 27 .OR. .NOT. UPDATED() ) .AND. EVAL( LI_BEOF, mslist )
|
||||
IF ( LASTKEY() == 27 .OR. .NOT. UPDATED() ) .AND. EVAL( LI_BEOF, mslist )
|
||||
SETCOLOR( LI_CLR )
|
||||
@ LI_NSTR + LI_Y1, LI_X1 + 1 CLEAR TO LI_NSTR + LI_Y1, LI_X2 - 1
|
||||
LI_NSTR --
|
||||
@@ -464,11 +464,11 @@ PRIVATE str_bar := "
|
||||
READEXIT( vartmp )
|
||||
SET CURSOR OFF
|
||||
ENDIF
|
||||
CASE xkey = 27 // Esc
|
||||
CASE xkey == 27 // Esc
|
||||
rez := .F.
|
||||
rezproc := 0
|
||||
CASE xkey = - 1 .AND. ( maskey = Nil .OR. ASCAN( maskey, xkey ) = 0 ) // F2
|
||||
IF predit = 1
|
||||
CASE xkey == - 1 .AND. ( maskey == Nil .OR. ASCAN( maskey, xkey ) == 0 ) // F2
|
||||
IF predit == 1
|
||||
predit := predxx
|
||||
ELSEIF predit > 1
|
||||
predit := 1
|
||||
@@ -485,7 +485,7 @@ PRIVATE str_bar := "
|
||||
ELSE
|
||||
IF ym > LI_Y1 .AND. ym < LI_Y2 .AND. xm > LI_X1 .AND. xm < LI_X2
|
||||
IF predit < 2
|
||||
IF LI_NSTR = ym - LI_Y1
|
||||
IF LI_NSTR == ym - LI_Y1
|
||||
rez := .F.
|
||||
rezproc := 13
|
||||
ELSE
|
||||
@@ -495,7 +495,7 @@ PRIVATE str_bar := "
|
||||
ELSE
|
||||
i := FLDCOUNT( mslist, LI_X1 + 2, xm, LI_NLEFT ) + 1
|
||||
IF i <= FLDCOUNT( mslist, LI_X1 + 2, LI_X2 - 2, LI_NLEFT )
|
||||
IF i = 2 .AND. xm < LI_X1 + 2 + LEN( FLDSTR( mslist, LI_NLEFT + LI_COLPOS - 1 ) )
|
||||
IF i == 2 .AND. xm < LI_X1 + 2 + LEN( FLDSTR( mslist, LI_NLEFT + LI_COLPOS - 1 ) )
|
||||
i := 1
|
||||
ENDIF
|
||||
IF LI_COLPOS <> i .OR. LI_NSTR <> ym - LI_Y1
|
||||
@@ -543,13 +543,13 @@ LOCAL klf := 0, i := IIF( LI_FREEZE > 0, 1, fld1 )
|
||||
EXIT
|
||||
ENDIF
|
||||
klf ++
|
||||
i := IIF( i = LI_FREEZE, fld1, i + 1 )
|
||||
i := IIF( i == LI_FREEZE, fld1, i + 1 )
|
||||
xstrt += 2
|
||||
IF i > LI_COLCOUNT
|
||||
EXIT
|
||||
ENDIF
|
||||
ENDDO
|
||||
RETURN IIF( klf = 0, 1, klf )
|
||||
RETURN IIF( klf == 0, 1, klf )
|
||||
|
||||
*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||||
*+
|
||||
@@ -575,7 +575,7 @@ LOCAL i := 1, x, oldc, fif
|
||||
@ LI_Y1, x SAY LI_NAMES[ fif ]
|
||||
ENDIF
|
||||
x := x + MAX( LEN( FLDSTR( mslist, fif ) ), LEN( LI_NAMES[ fif ] ) ) + 1
|
||||
fif := IIF( fif = LI_FREEZE, LI_NLEFT, fif + 1 )
|
||||
fif := IIF( fif == LI_FREEZE, LI_NLEFT, fif + 1 )
|
||||
// DO MSFNEXT WITH mslist,fif
|
||||
i ++
|
||||
ENDDO
|
||||
@@ -633,17 +633,17 @@ LOCAL x, i, shablon, sviv, fif, fldname
|
||||
IF LI_KOLZ > 0
|
||||
fldname := SPACE( 8 )
|
||||
fif := IIF( LI_FREEZE > 0, 1, LI_NLEFT )
|
||||
IF LI_NLEFT <> LI_LEFTVISIBLE .AND. vybfld = 0
|
||||
IF LI_NLEFT <> LI_LEFTVISIBLE .AND. vybfld == 0
|
||||
@ nstroka, LI_X1 + 1 SAY "<"
|
||||
ENDIF
|
||||
IF DELETED()
|
||||
@ nstroka, LI_X1 + 1 SAY "*"
|
||||
ENDIF
|
||||
FOR i := 1 TO LI_NCOLUMNS
|
||||
IF i = LI_COLPOS
|
||||
IF i == LI_COLPOS
|
||||
LI_XPOS := x
|
||||
ENDIF
|
||||
IF vybfld = 0 .OR. vybfld = i
|
||||
IF vybfld == 0 .OR. vybfld == i
|
||||
// DO MSFNEXT WITH mslist,fif
|
||||
sviv := FLDSTR( mslist, fif )
|
||||
sviv := IIF( LEN( sviv ) < LI_X2 - 1 - x, sviv, SUBSTR( sviv, 1, LI_X2 - 1 - x ) )
|
||||
@@ -653,10 +653,10 @@ LOCAL x, i, shablon, sviv, fif, fldname
|
||||
sviv := IIF( LEN( sviv ) < LI_X2 - 1 - x, sviv, SUBSTR( sviv, 1, LI_X2 - 1 - x ) )
|
||||
ENDIF
|
||||
x := x + MAX( LEN( sviv ), IIF( LI_NAMES <> Nil .AND. LEN( LI_NAMES ) >= fif, LEN( LI_NAMES[ fif ] ), 0 ) ) + 1
|
||||
fif := IIF( fif = LI_FREEZE, LI_NLEFT, fif + 1 )
|
||||
fif := IIF( fif == LI_FREEZE, LI_NLEFT, fif + 1 )
|
||||
NEXT
|
||||
// DO MSFNEXT WITH mslist,fif
|
||||
IF fif <= LI_COLCOUNT .AND. vybfld = 0
|
||||
IF fif <= LI_COLCOUNT .AND. vybfld == 0
|
||||
IF LI_X2 - 1 - x > 0
|
||||
sviv := FLDSTR( mslist, fif )
|
||||
@ nstroka, x SAY SUBSTR( sviv, 1, LI_X2 - 1 - x )
|
||||
@@ -683,7 +683,7 @@ LOCAL fldtype, rez, vartmp
|
||||
IF LI_MSF != Nil
|
||||
IF numf <= LEN( LI_MSF )
|
||||
vartmp := LI_MSF[ numf ]
|
||||
IF ( fldtype := VALTYPE( vartmp ) ) = "B"
|
||||
IF ( fldtype := VALTYPE( vartmp ) ) == "B"
|
||||
vartmp := EVAL( vartmp, mslist, numf )
|
||||
IF LI_MSTYP[ numf ] == "C"
|
||||
RETURN PADR( vartmp, LI_MSLEN[ numf ] )
|
||||
@@ -694,7 +694,7 @@ LOCAL fldtype, rez, vartmp
|
||||
ELSEIF LI_MSTYP[ numf ] == "L"
|
||||
RETURN PADR( IIF( vartmp, "T", "F" ), LI_MSLEN[ numf ] )
|
||||
ENDIF
|
||||
ELSEIF fldtype = "C"
|
||||
ELSEIF fldtype == "C"
|
||||
numf := FIELDPOS( vartmp )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -702,16 +702,16 @@ LOCAL fldtype, rez, vartmp
|
||||
// fldtype := FIELDTYPE( numf )
|
||||
fldtype := LI_MSTYP[ numf ]
|
||||
DO CASE
|
||||
CASE fldtype = "C"
|
||||
CASE fldtype == "C"
|
||||
rez := FIELDGET( numf )
|
||||
CASE fldtype = "N"
|
||||
CASE fldtype == "N"
|
||||
// rez := STR( FIELDGET( numf ), FIELDSIZE( numf ), FIELDDECI( numf ) )
|
||||
rez := STR( FIELDGET( numf ), LI_MSLEN[ numf ], LI_MSDEC[ numf ] )
|
||||
CASE fldtype = "D"
|
||||
CASE fldtype == "D"
|
||||
rez := DTOC( FIELDGET( numf ) )
|
||||
CASE fldtype = "L"
|
||||
CASE fldtype == "L"
|
||||
rez := IIF( FIELDGET( numf ), "T", "F" )
|
||||
CASE fldtype = "M"
|
||||
CASE fldtype == "M"
|
||||
rez := " <Memo> "
|
||||
ENDCASE
|
||||
IF LI_BDESHIN <> Nil
|
||||
@@ -780,10 +780,10 @@ FUNCTION Defpict( mslist, i, maxlen )
|
||||
LOCAL spict, fldd, fldtype := LI_MSTYP[ i ], fldlen := LI_MSLEN[ i ]
|
||||
DO CASE
|
||||
CASE fldtype == "C"
|
||||
spict := IIF( maxlen = Nil, REPLICATE( "X", fldlen ), "@S" + NUM_STR( maxlen, 2 ) )
|
||||
spict := IIF( maxlen == Nil, REPLICATE( "X", fldlen ), "@S" + NUM_STR( maxlen, 2 ) )
|
||||
CASE fldtype == "N"
|
||||
fldd := LI_MSDEC[ i ]
|
||||
spict := IIF( fldd = 0, REPLICATE( "9", fldlen ), REPLICATE( "9", fldlen - 1 - fldd ) + "." + REPLICATE( "9", fldd ) )
|
||||
spict := IIF( fldd == 0, REPLICATE( "9", fldlen ), REPLICATE( "9", fldlen - 1 - fldd ) + "." + REPLICATE( "9", fldd ) )
|
||||
CASE fldtype == "D"
|
||||
spict := "@D"
|
||||
ENDCASE
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
PROCEDURE MAIN()
|
||||
LOCAL dDate
|
||||
LOCAL A
|
||||
@@ -5,27 +9,28 @@ LOCAL A
|
||||
SET DATE FORMAT TO "YYYY.MM.DD"
|
||||
SET CENTURY ON
|
||||
|
||||
dDate = 0d20051112
|
||||
dDate := 0d20051112
|
||||
? "Should be '2005.11.12' :", dDate
|
||||
|
||||
dDate = 0d18341112
|
||||
dDate := 0d18341112
|
||||
? "Should be '1834.11.12' :", dDate
|
||||
|
||||
dDate = 0d20040229 + 1
|
||||
dDate := 0d20040229 + 1
|
||||
? "Should be '2004.03.01' :", dDate
|
||||
|
||||
dDate = 0d20040229 - 1
|
||||
dDate := 0d20040229 - 1
|
||||
? "Should be '2004.02.28' :", dDate
|
||||
|
||||
? "Should be '4' :", 0d20040229 - 0d20040225
|
||||
? "Should be '0' :", 0d20040229 - 0d20040229
|
||||
|
||||
dDate = 0d20000229
|
||||
dDate := 0d20000229
|
||||
? "Should be '2000.02.29' :", dDate
|
||||
|
||||
a := '0d20040229+1'
|
||||
? "Should be '2004.03.01' :", &a
|
||||
|
||||
a :="DATE() - 0d20051112"
|
||||
a := "DATE() - 0d20051112"
|
||||
? "Number of days from 2005.11.12:", &a
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -115,7 +115,7 @@ function TForm()
|
||||
static oClass
|
||||
|
||||
if oClass == nil
|
||||
oClass = HBClass():New( "TFORM" ) // starts a new class definition
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cName" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" )
|
||||
@@ -143,10 +143,10 @@ static function New()
|
||||
|
||||
local Self := QSelf()
|
||||
|
||||
::nTop = 10
|
||||
::nLeft = 10
|
||||
::nBottom = 20
|
||||
::nRight = 40
|
||||
::nTop := 10
|
||||
::nLeft := 10
|
||||
::nBottom := 20
|
||||
::nRight := 40
|
||||
|
||||
return Self
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ function TForm()
|
||||
static oClass
|
||||
|
||||
if oClass == nil
|
||||
oClass = HBClass():New( "TFORM" ) // starts a new class definition
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cText" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" )
|
||||
|
||||
@@ -72,7 +72,7 @@ PROCEDURE FILES()
|
||||
DO WHILE n < NFILES
|
||||
n++
|
||||
@14,0 SAY "Deleting files.... "+Str( n )
|
||||
FErase ( "File" + LTrim( Str( n ) ) + ".Dbf" )
|
||||
FErase ( "File" + LTrim( Str( n ) ) + ".dbf" )
|
||||
ENDDO
|
||||
|
||||
RETURN NIL
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbgtinfo.ch"
|
||||
|
||||
@@ -21,7 +21,7 @@ function TForm()
|
||||
static oClass
|
||||
|
||||
if oClass == nil
|
||||
oClass = HBClass():New( "TFORM" ) // starts a new class definition
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cText" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" )
|
||||
@@ -41,11 +41,9 @@ static function New()
|
||||
|
||||
local Self := QSelf()
|
||||
|
||||
::nTop = 10
|
||||
::nLeft = 10
|
||||
::nBottom = 20
|
||||
::nRight = 40
|
||||
::nTop := 10
|
||||
::nLeft := 10
|
||||
::nBottom := 20
|
||||
::nRight := 40
|
||||
|
||||
return Self
|
||||
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ Local nExt, nExt7, nExtNEXT
|
||||
|
||||
Next /*next*/ nExt //next
|
||||
|
||||
FOR nExt = 1 TO nExt
|
||||
FOR nExt := 1 TO nExt
|
||||
QOut( nExt )
|
||||
NEXT
|
||||
|
||||
@@ -123,9 +123,9 @@ Local nExt, nExt7, nExtNEXT
|
||||
( next )->( next() )
|
||||
|
||||
IF( nExt > nExt+4 )
|
||||
nExt =nExt +nExt * 5
|
||||
nExt := nExt +nExt * 5
|
||||
ELSEIF( nExt > 0 )
|
||||
nExt = nExt * 6 + nExt
|
||||
nExt := nExt * 6 + nExt
|
||||
ELSE
|
||||
nExt +=5
|
||||
ENDIF
|
||||
@@ -176,7 +176,7 @@ FUNCTION BREAK_( break_break )
|
||||
LOCAL bReak:=0
|
||||
|
||||
++bReak
|
||||
IF( bReak = 0 )
|
||||
IF bReak == 0
|
||||
Break /*break*/ ( nil )
|
||||
BREAK /* break to beggining */
|
||||
Break(0) //in Clipper: syntax error: ')'
|
||||
@@ -1022,28 +1022,28 @@ PROCEDURE MACRO()
|
||||
MEMVAR s
|
||||
PRIVATE s
|
||||
|
||||
s = &s
|
||||
s = &s.
|
||||
s = &s.1
|
||||
s = &s.123
|
||||
s = &s._
|
||||
s = &s._____
|
||||
s = &s._1
|
||||
s = &s.1_bo
|
||||
s = _&s
|
||||
s = _&s.
|
||||
s = _&s.1
|
||||
s = _&s.123
|
||||
s = _&s._
|
||||
s = _&s._____
|
||||
s = _&s._1
|
||||
s = _&s.1_bo
|
||||
s = x_&s
|
||||
s = x_&s_1
|
||||
s = x_&s._1
|
||||
s = x_&s._123
|
||||
s = x_&s.123
|
||||
s = x_&s.2_
|
||||
s = x_&s.2_x
|
||||
s := &s
|
||||
s := &s.
|
||||
s := &s.1
|
||||
s := &s.123
|
||||
s := &s._
|
||||
s := &s._____
|
||||
s := &s._1
|
||||
s := &s.1_bo
|
||||
s := _&s
|
||||
s := _&s.
|
||||
s := _&s.1
|
||||
s := _&s.123
|
||||
s := _&s._
|
||||
s := _&s._____
|
||||
s := _&s._1
|
||||
s := _&s.1_bo
|
||||
s := x_&s
|
||||
s := x_&s_1
|
||||
s := x_&s._1
|
||||
s := x_&s._123
|
||||
s := x_&s.123
|
||||
s := x_&s.2_
|
||||
s := x_&s.2_x
|
||||
|
||||
RETURN
|
||||
RETURN
|
||||
|
||||
@@ -31,7 +31,7 @@ function TAny() /* builds a class */
|
||||
static hClass
|
||||
|
||||
if hClass == nil
|
||||
hClass = __clsNew( "TANY", 3 ) // cClassName, nDatas
|
||||
hClass := __clsNew( "TANY", 3 ) // cClassName, nDatas
|
||||
__clsAddMsg( hClass, "cName", 1, HB_OO_MSG_DATA ) // retrieve data
|
||||
__clsAddMsg( hClass, "_cName", 1, HB_OO_MSG_DATA ) // assign data. Note the '_'
|
||||
__clsAddMsg( hClass, "New", @New(), HB_OO_MSG_METHOD )
|
||||
@@ -50,7 +50,7 @@ static function New()
|
||||
QOut( ValType( Self ) )
|
||||
QOut( "Inside New()" )
|
||||
|
||||
::cName = "Harbour OOP"
|
||||
::cName := "Harbour OOP"
|
||||
|
||||
return Self
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ LOCAL nPrev:=SECONDS()
|
||||
@ 11,2 SAY "Memory after TEST() and before collecting" + STR( MEMORY(HB_MEM_USED) )
|
||||
HB_GCALL()
|
||||
@ 12,2 SAY "Memory after collecting" + STR( MEMORY(HB_MEM_USED) )
|
||||
nH1 = HB_IDLEADD( {|| DEVPOS(0,01), DEVOUT( TIME() ) } )
|
||||
nH2 = HB_IDLEADD( {|| DEVPOS(0,21), TEST(), DEVOUT( MEMORY(HB_MEM_USED) ) } )
|
||||
nH3 = HB_IDLEADD( {|| DEVPOS(0,41), IIF(n=4,n:=1,n++),DEVOUT(aSign[n]) } )
|
||||
nH4 = HB_IDLEADD( {|| DEVPOS(0,61), DEVOUT( 1000*(SECONDS()-nPrev) ), nPrev:=SECONDS() } )
|
||||
nH1 := HB_IDLEADD( {|| DEVPOS(0,01), DEVOUT( TIME() ) } )
|
||||
nH2 := HB_IDLEADD( {|| DEVPOS(0,21), TEST(), DEVOUT( MEMORY(HB_MEM_USED) ) } )
|
||||
nH3 := HB_IDLEADD( {|| DEVPOS(0,41), IIF(n=4,n:=1,n++),DEVOUT(aSign[n]) } )
|
||||
nH4 := HB_IDLEADD( {|| DEVPOS(0,61), DEVOUT( 1000*(SECONDS()-nPrev) ), nPrev:=SECONDS() } )
|
||||
|
||||
? VALTYPE(nH1), nH1, VALTYPE(nH2), nH2, VALTYPE(nH3), nH3, VALTYPE(nH4), nH4
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
/*
|
||||
* ReadHRB
|
||||
*
|
||||
* This program will read the .HRB file and shows its contents
|
||||
* This program will read the .hrb file and shows its contents
|
||||
*
|
||||
* ReadHRB <program file> {No .HRB extension please}
|
||||
* ReadHRB <program file> {No .hrb extension please}
|
||||
*
|
||||
* Written by Eddie Runia <eddie@runia.com>
|
||||
* www - http://www.harbour-project.org
|
||||
@@ -38,7 +38,7 @@ function Main( cFrom )
|
||||
if cFrom == NIL
|
||||
cFrom := "hello.hrb"
|
||||
else
|
||||
cFrom := cFrom + ".hrb"
|
||||
cFrom += ".hrb"
|
||||
endif
|
||||
|
||||
hFile := fOpen( cFrom )
|
||||
|
||||
@@ -49,7 +49,7 @@ function trtf()
|
||||
static oclass
|
||||
|
||||
if oclass == nil
|
||||
oclass = HBClass():new( "trtf" )
|
||||
oclass := HBClass():new( "trtf" )
|
||||
oclass:adddata( "nhandle" )
|
||||
oclass:addmethod( "new", @new() )
|
||||
oclass:addmethod( "write", @write() )
|
||||
@@ -60,7 +60,7 @@ return oclass:instance()
|
||||
|
||||
static function new( cfilename )
|
||||
local self := qself()
|
||||
::nhandle = fcreate( cfilename )
|
||||
::nhandle := fcreate( cfilename )
|
||||
fwrite( ::nhandle,;
|
||||
"{\rtf1\ansi\deff0{\fonttbl {\f0\fnil\fcharset0 Courier New;}{\f1\fnil\fcharset0 Arial;}}"+;
|
||||
"\uc1\pard\lang1033\ulnone\f0\fs20"+CRLF)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
Function Main()
|
||||
Local Program := { , }, Condition := 1, body := 2, Counter := 1, TheEnd := 1000000, stop, start
|
||||
|
||||
@@ -17,5 +21,3 @@ Function Main()
|
||||
? '==============='
|
||||
? stop - start
|
||||
Return NIL
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef __XHARBOUR__
|
||||
#define OTHERWISE DEFAULT
|
||||
#endif
|
||||
|
||||
@@ -35,7 +35,7 @@ Function Main( cOption, cCmd )
|
||||
|
||||
FOR f=1 TO Len(aDir)
|
||||
IF TestIt(aDir[f][1])
|
||||
p = At(".PRG",Upper(aDir[f][1]))
|
||||
p := At(".prg",Lower(aDir[f][1]))
|
||||
IF p > 1
|
||||
n := Left(aDir[f][1],p-1)
|
||||
fWrite(o,":" + n + Chr(13) + Chr(10))
|
||||
|
||||
@@ -21,13 +21,13 @@ function Main()
|
||||
local nRow, nCol
|
||||
local nTmpRow, nTmpCol
|
||||
|
||||
oBrowse:colorSpec = "W+/B, N/BG"
|
||||
oBrowse:ColSep = "³"
|
||||
oBrowse:HeadSep = "ÑÍ"
|
||||
oBrowse:FootSep = "ÏÍ"
|
||||
oBrowse:GoTopBlock = { || n := 1 }
|
||||
oBrowse:GoBottomBlock = { || n := Len( aTest0 ) }
|
||||
oBrowse:SkipBlock = { | nSkip, nPos | nPos := n,;
|
||||
oBrowse:colorSpec := "W+/B, N/BG"
|
||||
oBrowse:ColSep := "³"
|
||||
oBrowse:HeadSep := "ÑÍ"
|
||||
oBrowse:FootSep := "ÏÍ"
|
||||
oBrowse:GoTopBlock := { || n := 1 }
|
||||
oBrowse:GoBottomBlock := { || n := Len( aTest0 ) }
|
||||
oBrowse:SkipBlock := { | nSkip, nPos | nPos := n,;
|
||||
n := If( nSkip > 0, Min( Len( aTest0 ), n + nSkip ),;
|
||||
Max( 1, n + nSkip )), n - nPos }
|
||||
|
||||
@@ -36,22 +36,22 @@ function Main()
|
||||
oBrowse:AddColumn( TBColumnNew( "Third", { || aTest1[ n ] } ) )
|
||||
oBrowse:AddColumn( TBColumnNew( "Forth", { || aTest2[ n ] } ) )
|
||||
oBrowse:AddColumn( TBColumnNew( "Fifth", { || aTest3[ n ] } ) )
|
||||
oBrowse:GetColumn(1):Footing = 'Number'
|
||||
oBrowse:GetColumn(2):Footing = 'Strins'
|
||||
oBrowse:GetColumn(1):Footing := 'Number'
|
||||
oBrowse:GetColumn(2):Footing := 'Strins'
|
||||
|
||||
oBrowse:GetColumn(2):Picture := '@!'
|
||||
|
||||
oBrowse:GetColumn(3):Footing = 'Number'
|
||||
oBrowse:GetColumn(3):Footing := 'Number'
|
||||
oBrowse:GetColumn(3):Picture := '999,999.99'
|
||||
oBrowse:GetColumn(4):Footing = 'Dates'
|
||||
oBrowse:GetColumn(5):Footing = 'Logical'
|
||||
oBrowse:GetColumn(4):Footing := 'Dates'
|
||||
oBrowse:GetColumn(5):Footing := 'Logical'
|
||||
// needed since I've changed some columns _after_ I've added them to TBrowse object
|
||||
oBrowse:Configure()
|
||||
|
||||
Alert( oBrowse:ClassName() )
|
||||
Alert( oBrowse:GetColumn( 1 ):ClassName() )
|
||||
|
||||
oBrowse:Freeze = 1
|
||||
oBrowse:Freeze := 1
|
||||
nCursor := SetCursor( 0 )
|
||||
cColor := SetColor( "W+/B" )
|
||||
nRow := Row()
|
||||
@@ -69,12 +69,12 @@ enddo
|
||||
While !lEnd
|
||||
oBrowse:ForceStable()
|
||||
|
||||
nKey = InKey( 0 )
|
||||
nKey := InKey( 0 )
|
||||
|
||||
do case
|
||||
case nKey == K_ESC
|
||||
SetPos( 17, 0 )
|
||||
lEnd = .t.
|
||||
lEnd := .t.
|
||||
|
||||
case nKey == K_DOWN
|
||||
oBrowse:Down()
|
||||
@@ -88,37 +88,37 @@ While !lEnd
|
||||
case nKey == K_RIGHT
|
||||
oBrowse:Right()
|
||||
|
||||
case nKey = K_PGDN
|
||||
case nKey == K_PGDN
|
||||
oBrowse:pageDown()
|
||||
|
||||
case nKey = K_PGUP
|
||||
case nKey == K_PGUP
|
||||
oBrowse:pageUp()
|
||||
|
||||
case nKey = K_CTRL_PGUP
|
||||
case nKey == K_CTRL_PGUP
|
||||
oBrowse:goTop()
|
||||
|
||||
case nKey = K_CTRL_PGDN
|
||||
case nKey == K_CTRL_PGDN
|
||||
oBrowse:goBottom()
|
||||
|
||||
case nKey = K_HOME
|
||||
case nKey == K_HOME
|
||||
oBrowse:home()
|
||||
|
||||
case nKey = K_END
|
||||
case nKey == K_END
|
||||
oBrowse:end()
|
||||
|
||||
case nKey = K_CTRL_LEFT
|
||||
case nKey == K_CTRL_LEFT
|
||||
oBrowse:panLeft()
|
||||
|
||||
case nKey = K_CTRL_RIGHT
|
||||
case nKey == K_CTRL_RIGHT
|
||||
oBrowse:panRight()
|
||||
|
||||
case nKey = K_CTRL_HOME
|
||||
case nKey == K_CTRL_HOME
|
||||
oBrowse:panHome()
|
||||
|
||||
case nKey = K_CTRL_END
|
||||
case nKey == K_CTRL_END
|
||||
oBrowse:panEnd()
|
||||
|
||||
case nKey = K_TAB
|
||||
case nKey == K_TAB
|
||||
nTmpRow := ROW()
|
||||
nTmpCol := COL()
|
||||
@ 0, 0 SAY TIME()
|
||||
@@ -136,7 +136,7 @@ return nil
|
||||
#ifdef HB_COMPAT_C53
|
||||
function defproc(ob,nkey)
|
||||
Local nTmpRow,nTmpCol
|
||||
if nKey = K_TAB
|
||||
if nKey == K_TAB
|
||||
nTmpRow := ROW()
|
||||
nTmpCol := COL()
|
||||
@ 0, 0 SAY TIME()
|
||||
|
||||
@@ -66,7 +66,7 @@ FUNCTION Main()
|
||||
i := 1
|
||||
DO WHILE i <= nPos
|
||||
|
||||
IF substr( cString, i, 1 ) = chr( 13 )
|
||||
IF substr( cString, i, 1 ) == chr( 13 )
|
||||
i := i + 1
|
||||
cLine := cBuf
|
||||
cBuf := ""
|
||||
@@ -175,7 +175,7 @@ FUNCTION THTML
|
||||
STATIC oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass = HBClass():New( "THTML" )
|
||||
oClass := HBClass():New( "THTML" )
|
||||
|
||||
oClass:AddData( "cTitle" ) // Page Title
|
||||
oClass:AddData( "cBody" ) // HTML Body Handler
|
||||
@@ -405,12 +405,12 @@ STATIC FUNCTION ProcessCGI()
|
||||
len( cBuff ) - at( "=", cBuff ) + 1 ), "+", " " ) } )
|
||||
cBuff := ""
|
||||
ELSE
|
||||
IF substr( cQuery, i, 1 ) = "%"
|
||||
IF substr( cQuery, i, 1 ) == "%"
|
||||
cBuff += chr( Hex2Dec( substr( cQuery, i + 1, 2 ) ) )
|
||||
nBuff := 3
|
||||
ENDIF
|
||||
|
||||
IF nBuff = 0
|
||||
IF nBuff == 0
|
||||
cBuff += substr( cQuery, i, 1 )
|
||||
ELSE
|
||||
nBuff--
|
||||
|
||||
@@ -13,7 +13,7 @@ function Main()
|
||||
o:Another( "Hello" ) // "Another" message is not defined for Class Test, but
|
||||
// it will invoke ON ERROR MyErrorManager() method
|
||||
|
||||
o:Another = 5 // Notice how __GetMessage() shows a underscored message
|
||||
o:Another := 5 // Notice how __GetMessage() shows a underscored message
|
||||
// as we are setting a DATA value.
|
||||
return nil
|
||||
|
||||
@@ -32,4 +32,3 @@ METHOD MyErrorManager( uParam1 ) CLASS Test
|
||||
Alert( __GetMessage() ) // Shows the message that was sent to the object
|
||||
|
||||
return nil
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
Procedure Main()
|
||||
|
||||
LOCAL GetList := {}, cVar := "Hello"
|
||||
|
||||
@@ -48,7 +48,7 @@ FUNCTION THTML
|
||||
STATIC oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass = HBClass():New( "THTML" )
|
||||
oClass := HBClass():New( "THTML" )
|
||||
|
||||
oClass:AddData( "cTitle" ) // Page Title
|
||||
oClass:AddData( "cBody" ) // HTML Body Handler
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// #include "set.ch" - Preset in pptable.c
|
||||
|
||||
PROCEDURE MAIN()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
INIT PROCEDURE Init()
|
||||
|
||||
? "In Init"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
function main
|
||||
Local i:=0, block
|
||||
Field Last, First
|
||||
@@ -66,4 +70,4 @@ Field Last, First
|
||||
|
||||
Use
|
||||
|
||||
return Nil
|
||||
return Nil
|
||||
|
||||
@@ -10,12 +10,12 @@ function Main()
|
||||
local oTest := Test():New()
|
||||
local oTest2 := Test2():New()
|
||||
|
||||
oTest:One = "hello"
|
||||
oTest:Two = 123
|
||||
oTest:Three = "this value is not persistent"
|
||||
oTest:Four = oTest2 // We store another persistent object here
|
||||
oTest:One := "hello"
|
||||
oTest:Two := 123
|
||||
oTest:Three := "this value is not persistent"
|
||||
oTest:Four := oTest2 // We store another persistent object here
|
||||
|
||||
oTest2:Five = "some more text"
|
||||
oTest2:Five := "some more text"
|
||||
|
||||
? oTest:SaveToText() // We save it to a text
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "ORD.CH"
|
||||
|
||||
#define CRLF Chr(13)+Chr(10)
|
||||
|
||||
@@ -48,8 +48,8 @@ local nI, c, d
|
||||
outstd (a ** b)
|
||||
outstd (cNewLine)
|
||||
|
||||
c = a * b
|
||||
d = b * a
|
||||
c := a * b
|
||||
d := b * a
|
||||
outstd (cNewLine)
|
||||
outstd( "4: " )
|
||||
outstd (str (c))
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL i, bBlock[3]
|
||||
@@ -11,18 +15,18 @@ PROCEDURE Main()
|
||||
|
||||
CLS
|
||||
|
||||
FOR i = 1 TO 3
|
||||
FOR i := 1 TO 3
|
||||
M->Macro := "Var" + Str( i, 1 )
|
||||
bBlock[i] := {|| &Macro }
|
||||
NEXT
|
||||
|
||||
? "Early (Simple):"
|
||||
|
||||
FOR i = 1 TO 3
|
||||
FOR i := 1 TO 3
|
||||
? Eval( bBlock[i] )
|
||||
NEXT
|
||||
|
||||
FOR i = 1 TO 3
|
||||
FOR i := 1 TO 3
|
||||
M->Macro := "Var" + Str( i, 1 )
|
||||
bBlock[i] := {|| &Macro + "!" }
|
||||
NEXT
|
||||
@@ -30,11 +34,11 @@ PROCEDURE Main()
|
||||
?
|
||||
? "Early (Complex):"
|
||||
|
||||
FOR i = 1 TO 3
|
||||
FOR i := 1 TO 3
|
||||
? Eval( bBlock[i] )
|
||||
NEXT
|
||||
|
||||
FOR i = 1 TO 3
|
||||
FOR i := 1 TO 3
|
||||
M->Macro := "Var" + Str( i, 1 )
|
||||
bBlock[i] := {|| &(Macro) }
|
||||
NEXT
|
||||
@@ -42,7 +46,7 @@ PROCEDURE Main()
|
||||
?
|
||||
? "Late:"
|
||||
|
||||
FOR i = 1 TO 3
|
||||
FOR i := 1 TO 3
|
||||
? Eval( bBlock[i] )
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ FUNCTION TValue
|
||||
STATIC oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass = HBClass():New( "TValue" )
|
||||
oClass := HBClass():New( "TValue" )
|
||||
|
||||
oClass:AddData( "cVal" )
|
||||
oClass:AddMethod( "New", @New() ) // New Method
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
* VIDEOTST.PRG
|
||||
|
||||
* videotst.prg
|
||||
*
|
||||
* Copyright 2000 Alejandro de Garate <alex_degarate@hotmail.com>
|
||||
*
|
||||
* Test SETMODE() for Harbour Project
|
||||
*
|
||||
|
||||
#define HB_NOT_SUPPORTED "Video mode not supported on this system.."
|
||||
#define HB_VROW 1
|
||||
#define HB_VCOL 2
|
||||
@@ -42,7 +44,7 @@ FUNCTION MAIN()
|
||||
MENU TO nMode
|
||||
|
||||
If (nMode > 0)
|
||||
lSuccess = SETMODE( aVModes [nMode] [HB_VROW], aVModes [nMode] [HB_VCOL])
|
||||
lSuccess := SETMODE( aVModes [nMode] [HB_VROW], aVModes [nMode] [HB_VCOL])
|
||||
|
||||
IF lSuccess == .T.
|
||||
TESTBOX( aVModes [nMode] [HB_PROMPT] )
|
||||
@@ -81,4 +83,3 @@ FUNCTION MAIN()
|
||||
@ 5, 2 SAY "MaxCol() = " + STR( MAXCOL(), 3)
|
||||
INKEY(0)
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ static function ColourBoxes()
|
||||
// display boxes to screen
|
||||
|
||||
do while nFrames < 5000
|
||||
if nDir = 1
|
||||
if nDir == 1
|
||||
dispbegin()
|
||||
else
|
||||
dispend()
|
||||
|
||||
@@ -35,8 +35,8 @@ proc main()
|
||||
SetMode( MaxRow() + 1, MaxCol() + 1 )
|
||||
|
||||
/* get screen dimensions */
|
||||
nMaxScrRow = hb_gtInfo( HB_GTI_DESKTOPROWS )
|
||||
nMaxScrCol = hb_gtInfo( HB_GTI_DESKTOPCOLS )
|
||||
nMaxScrRow := hb_gtInfo( HB_GTI_DESKTOPROWS )
|
||||
nMaxScrCol := hb_gtInfo( HB_GTI_DESKTOPCOLS )
|
||||
|
||||
/* resize console window to the screen size */
|
||||
SetMode( nMaxScrRow, nMaxScrCol )
|
||||
|
||||
Reference in New Issue
Block a user