diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5119dbb8a8..9594af8690 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,24 @@ The license applies to all entries newer than 2009-04-28. */ +2012-07-19 11:28 UTC+0200 Viktor Szakats (harbour syenar.net) + * tests/cursrtst.prg + * tests/db_brows.prg + * tests/debugtst.prg + * tests/dirtest.prg + * tests/foreach.prg + * tests/funcarr.prg + * tests/memvar.prg + * tests/objarr.prg + * tests/onidle.prg + * tests/speedstr.prg + * tests/speedtst.prg + * tests/switch.prg + * tests/testdbf.prg + * tests/testdecl.prg + * tests/testget.prg + * formatting + 2012-07-19 11:00 UTC+0200 Viktor Szakats (harbour syenar.net) * tests/ac_test.prg * tests/ac_test2.prg diff --git a/harbour/tests/cursrtst.prg b/harbour/tests/cursrtst.prg index 8c1f192fe6..5b04d253f1 100644 --- a/harbour/tests/cursrtst.prg +++ b/harbour/tests/cursrtst.prg @@ -24,8 +24,8 @@ PROCEDURE CursTest( nCurs ) LOCAL aNames := { "SC_NONE", "SC_NORMAL", "SC_INSERT", "SC_SPECIAL1", "SC_SPECIAL2" } SetCursor( nCurs ) - ++ nCurs - ? PadR( aNames[nCurs], 11 ), PadR( aTypes[nCurs], 11 ), Str( SetCursor(), 3 ) + ++nCurs + ? PadR( aNames[ nCurs ], 11 ), PadR( aTypes[ nCurs ], 11 ), Str( SetCursor(), 3 ) Inkey( 0 ) RETURN diff --git a/harbour/tests/db_brows.prg b/harbour/tests/db_brows.prg index 50429f8bf9..a4e8ff5915 100644 --- a/harbour/tests/db_brows.prg +++ b/harbour/tests/db_brows.prg @@ -32,49 +32,49 @@ #include "fileio.ch" -#define LI_LEN 42 -#define LI_NSTR mslist[1] -#define LI_CLR mslist[2] // Color of a window -#define LI_CLRV mslist[3] // Color of a current line -#define LI_BSKIP mslist[4] // Codeblock for a 'skip' operation -#define LI_BGTOP mslist[5] // Codeblock for a 'go top' -#define LI_BGBOT mslist[6] // Codeblock for a 'go bottom' -#define LI_BEOF mslist[7] // Codeblock for a 'eof' checking -#define LI_BBOF mslist[8] // Codeblock for a 'bof' checking -#define LI_B1 mslist[9] -#define LI_MSF mslist[10] // Array of codeblocks for columns -#define LI_NAMES mslist[11] // Array of the fields names -#define LI_NMCLR mslist[12] // Color of field names line -#define LI_FREEZE mslist[13] // Number of fields to 'freeze' from left -#define LI_RCOU mslist[14] -#define LI_MSREC mslist[15] -#define LI_PRFLT mslist[16] -#define LI_TEKZP mslist[17] -#define LI_KOLZ mslist[18] -#define LI_VALID mslist[19] // Array of codeblocks for postvalidation while changing a field -#define LI_WHEN mslist[20] // Array of codeblocks for prevalidation while changing a field -#define LI_MSNAME mslist[21] -#define LI_MSTYP mslist[22] -#define LI_MSLEN mslist[23] -#define LI_MSDEC mslist[24] -#define LI_EXPFI mslist[25] -#define LI_BDESHIN mslist[26] -#define LI_BDESHOUT mslist[27] -#define LI_RECNO mslist[28] -#define LI_BGOTO mslist[29] -#define LI_Y1 mslist[30] -#define LI_X1 mslist[31] -#define LI_Y2 mslist[32] -#define LI_X2 mslist[33] -#define LI_LSOHR mslist[34] -#define LI_LVIEW mslist[35] -#define LI_NCOLUMNS mslist[36] -#define LI_LEFTVISIBLE mslist[37] -#define LI_NLEFT mslist[38] -#define LI_COLPOS mslist[39] -#define LI_XPOS mslist[40] -#define LI_MSED mslist[41] -#define LI_COLCOUNT mslist[42] +#define LI_LEN 42 +#define LI_NSTR mslist[ 1 ] +#define LI_CLR mslist[ 2 ] // Color of a window +#define LI_CLRV mslist[ 3 ] // Color of a current line +#define LI_BSKIP mslist[ 4 ] // Codeblock for a 'skip' operation +#define LI_BGTOP mslist[ 5 ] // Codeblock for a 'go top' +#define LI_BGBOT mslist[ 6 ] // Codeblock for a 'go bottom' +#define LI_BEOF mslist[ 7 ] // Codeblock for a 'eof' checking +#define LI_BBOF mslist[ 8 ] // Codeblock for a 'bof' checking +#define LI_B1 mslist[ 9 ] +#define LI_MSF mslist[ 10 ] // Array of codeblocks for columns +#define LI_NAMES mslist[ 11 ] // Array of the fields names +#define LI_NMCLR mslist[ 12 ] // Color of field names line +#define LI_FREEZE mslist[ 13 ] // Number of fields to 'freeze' from left +#define LI_RCOU mslist[ 14 ] +#define LI_MSREC mslist[ 15 ] +#define LI_PRFLT mslist[ 16 ] +#define LI_TEKZP mslist[ 17 ] +#define LI_KOLZ mslist[ 18 ] +#define LI_VALID mslist[ 19 ] // Array of codeblocks for postvalidation while changing a field +#define LI_WHEN mslist[ 20 ] // Array of codeblocks for prevalidation while changing a field +#define LI_MSNAME mslist[ 21 ] +#define LI_MSTYP mslist[ 22 ] +#define LI_MSLEN mslist[ 23 ] +#define LI_MSDEC mslist[ 24 ] +#define LI_EXPFI mslist[ 25 ] +#define LI_BDESHIN mslist[ 26 ] +#define LI_BDESHOUT mslist[ 27 ] +#define LI_RECNO mslist[ 28 ] +#define LI_BGOTO mslist[ 29 ] +#define LI_Y1 mslist[ 30 ] +#define LI_X1 mslist[ 31 ] +#define LI_Y2 mslist[ 32 ] +#define LI_X2 mslist[ 33 ] +#define LI_LSOHR mslist[ 34 ] +#define LI_LVIEW mslist[ 35 ] +#define LI_NCOLUMNS mslist[ 36 ] +#define LI_LEFTVISIBLE mslist[ 37 ] +#define LI_NLEFT mslist[ 38 ] +#define LI_COLPOS mslist[ 39 ] +#define LI_XPOS mslist[ 40 ] +#define LI_MSED mslist[ 41 ] +#define LI_COLCOUNT mslist[ 42 ] MEMVAR str_bar diff --git a/harbour/tests/debugtst.prg b/harbour/tests/debugtst.prg index d6201b00ee..2d6c334b7d 100644 --- a/harbour/tests/debugtst.prg +++ b/harbour/tests/debugtst.prg @@ -241,7 +241,7 @@ STATIC FUNCTION Transfer( x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 ) /* etc */ xData := aParam[ n ] IF ValType( xData ) == "A" - IF ValType( xData[1] ) == "A" // 2D array passed + IF ValType( xData[ 1 ] ) == "A" // 2D array passed xRet := __objSetValueList( self, xData ) ELSE // 1D array passed xRet := __objSetValueList( self, { xData } ) @@ -249,7 +249,7 @@ STATIC FUNCTION Transfer( x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 ) /* etc */ ELSEIF ValType( xData ) == "O" // Object passed xRet := ::Transfer( xData:Transfer() ) - ELSEIF ValType( xData ) != "U" + ELSEIF !( ValType( xData ) == "U" ) QOut( "TRANSFER: Incorrect argument(", n, ") ", xData ) ENDIF diff --git a/harbour/tests/dirtest.prg b/harbour/tests/dirtest.prg index cfaed79a3f..190dc4ea61 100644 --- a/harbour/tests/dirtest.prg +++ b/harbour/tests/dirtest.prg @@ -3,27 +3,30 @@ */ // directory test + +#include "directry.ch" + PROCEDURE Main( filespec, attribs, cshort ) - LOCAL adir := {} - LOCAL x := 0, lShort := .f. + LOCAL aDir := {} + LOCAL x := 0, lShort := .F. - IF !cshort == NIL .and. (Upper( cShort ) == "TRUE" .or. Upper( cShort ) == ".T.") - lShort := .t. + IF ! cshort == NIL .AND. ( Upper( cShort ) == "TRUE" .OR. Upper( cShort ) == ".T." ) + lShort := .T. ENDIF -// adir := asort( directory(filespec,attribs,lShort),,, {|x,y|upper(x[1]) < upper(y[1])} ) - adir := directory(filespec,attribs,lShort) + // aDir := ASort( Directory( filespec, attribs, lShort ),,, {| x, y | Upper( x[ F_NAME ] ) < Upper( y[ F_NAME ] ) } ) + aDir := Directory( filespec, attribs, lShort ) SET CENTURY ON - FOR x := 1 TO len( adir ) - outstd(hb_eol()) - outstd(padr(adir[x,1], 20), "|", ; - transform(adir[x,2], "9,999,999,999"), "|", ; - adir[x,3], "|", ; - adir[x,4], "|", ; - adir[x,5]) + FOR x := 1 TO Len( aDir ) + OutStd( hb_eol() ) + OutStd( PadR( aDir[ x, F_NAME ], 20 ), "|", ; + Transform( aDir[ x, F_SIZE ], "9,999,999,999" ), "|", ; + aDir[ x, F_DATE ], "|", ; + aDir[ x, F_TIME ], "|", ; + aDir[ x, F_ATTR ] ) NEXT RETURN diff --git a/harbour/tests/foreach.prg b/harbour/tests/foreach.prg index 394acbb5db..c3145b3104 100644 --- a/harbour/tests/foreach.prg +++ b/harbour/tests/foreach.prg @@ -19,7 +19,7 @@ PROCEDURE Main() ? "========================================================" ? "before loop: ENUM=", ENUM - ? "before loop: a[1]=", a[1], "a[2]=", a[2], "a[3]=", a[3] + ? "before loop: a[1]=", a[ 1 ], "a[2]=", a[ 2 ], "a[3]=", a[ 3 ] FOR EACH enum IN A ? "start: ENUM=", ENUM IF ENUM = "two" @@ -28,7 +28,7 @@ PROCEDURE Main() ? "end: ENUM=", ENUM, "| index:", ENUM:__enumIndex, "| value:", ENUM:__enumValue, "| base: ", ValType( ENUM:__enumBase ) NEXT ? "after loop ENUM=", ENUM - ? "after loop: a[1]=", a[1], "a[2]=", a[2], "a[3]=", a[3] + ? "after loop: a[1]=", a[ 1 ], "a[2]=", a[ 2 ], "a[3]=", a[ 3 ] ? "-----------------" ? Inkey( 0 ) @@ -37,7 +37,7 @@ PROCEDURE Main() ? "========================================================" ? "Testing passing by reference" ? "before loop: ENUM=", ENUM - ? "after loop: a[1]=", a[1], "a[2]=", a[2], "a[3]=", a[3] + ? "after loop: a[1]=", a[ 1 ], "a[2]=", a[ 2 ], "a[3]=", a[ 3 ] FOR EACH ENUM IN A IF Upper( ENUM ) = "TWO" ENUM := Upper( ENUM ) @@ -47,13 +47,13 @@ PROCEDURE Main() ENDIF NEXT ? "after loop ENUM=", ENUM - ? "after loop: a[1]=", a[1], "a[2]=", a[2], "a[3]=", a[3] + ? "after loop: a[1]=", a[ 1 ], "a[2]=", a[ 2 ], "a[3]=", a[ 3 ] Inkey( 0 ) ? "========================================================" ? "Testing BREAK" ? "before loop: ENUM=", ENUM - ? "after loop: a[1]=", a[1], "a[2]=", a[2], "a[3]=", a[3] + ? "after loop: a[1]=", a[ 1 ], "a[2]=", a[ 2 ], "a[3]=", a[ 3 ] BEGIN SEQUENCE FOR EACH enum IN A DESCEND ? "loop: ENUM=", ENUM, "| index:", ENUM:__enumIndex, "| value:", ENUM:__enumValue, "| base: ", ValType( ENUM:__enumBase ) @@ -62,7 +62,7 @@ PROCEDURE Main() RECOVER USING i ? "after loop ENUM=", ENUM - ? "after loop: a[1]=", a[1], "a[2]=", a[2], "a[3]=", a[3] + ? "after loop: a[1]=", a[ 1 ], "a[2]=", a[ 2 ], "a[3]=", a[ 3 ] ? "recover variable i=", i END SEQUENCE Inkey( 0 ) diff --git a/harbour/tests/funcarr.prg b/harbour/tests/funcarr.prg index 50904cdaf3..cebbe0cc54 100644 --- a/harbour/tests/funcarr.prg +++ b/harbour/tests/funcarr.prg @@ -15,39 +15,39 @@ PROCEDURE Main() LOCAL a - QOut( "Direct reference : ", aFunc()[1] ) + QOut( "Direct reference : ", aFunc()[ 1 ] ) a := aFunc() - QOut( "Ref via array : ", a[1] ) + QOut( "Ref via array : ", a[ 1 ] ) - aFunc()[1] := "Something different" - QOut( "Assign new text : ", aFunc()[1] ) + aFunc()[ 1 ] := "Something different" + QOut( "Assign new text : ", aFunc()[ 1 ] ) - aFunc()[1] := 4 - QOut( "Assign 4 : ", aFunc()[1] ) + aFunc()[ 1 ] := 4 + QOut( "Assign 4 : ", aFunc()[ 1 ] ) - QOut( "Post increment : ", aFunc()[1] ++ ) - QOut( "After : ", aFunc()[1] ) - QOut( "Pre decrement : ", -- aFunc()[1] ) - QOut( "After : ", aFunc()[1] ) + QOut( "Post increment : ", aFunc()[ 1 ]++ ) + QOut( "After : ", aFunc()[ 1 ] ) + QOut( "Pre decrement : ", --aFunc()[ 1 ] ) + QOut( "After : ", aFunc()[ 1 ] ) - aFunc()[1] += 2 - QOut( "Plus 2 : ", aFunc()[1] ) + aFunc()[ 1 ] += 2 + QOut( "Plus 2 : ", aFunc()[ 1 ] ) - aFunc()[1] -= 3 - QOut( "Minus 3 : ", aFunc()[1] ) + aFunc()[ 1 ] -= 3 + QOut( "Minus 3 : ", aFunc()[ 1 ] ) - aFunc()[1] *= 3 - QOut( "Times 3 : ", aFunc()[1] ) + aFunc()[ 1 ] *= 3 + QOut( "Times 3 : ", aFunc()[ 1 ] ) - aFunc()[1] /= 1.5 - QOut( "Divide by 1.5 : ", aFunc()[1] ) + aFunc()[ 1 ] /= 1.5 + QOut( "Divide by 1.5 : ", aFunc()[ 1 ] ) - aFunc()[1] %= 4 - QOut( "Modulus 4 : ", aFunc()[1] ) + aFunc()[ 1 ] %= 4 + QOut( "Modulus 4 : ", aFunc()[ 1 ] ) - aFunc()[1] ^= 3 - QOut( "To the power 3 : ", aFunc()[1] ) + aFunc()[ 1 ] ^= 3 + QOut( "To the power 3 : ", aFunc()[ 1 ] ) QOut( "Global stack" ) Debug( __dbgVMStkGList() ) // Please note a is a reference to aArray ! diff --git a/harbour/tests/memvar.prg b/harbour/tests/memvar.prg index 2929f0fa6f..a871b0a57f 100644 --- a/harbour/tests/memvar.prg +++ b/harbour/tests/memvar.prg @@ -201,7 +201,7 @@ PROCEDURE TEST5() QOut( "==Test for memvars passed by reference and __PUBLIC/__PRIVATE " ) QOut( " uninitialized PUBLIC= ", mempublic ) - // QOut( "uninitialized PUBLIC array (first item)=", public2[1] ) + // QOut( "uninitialized PUBLIC array (first item)=", public2[ 1 ] ) QOut( "initialized PUBLIC= ", public3 ) QOut( " uninitialized PRIVATE= ", memprivate ) QOut( "uninitialized PARAMETER= ", memparam ) diff --git a/harbour/tests/objarr.prg b/harbour/tests/objarr.prg index 8e7c0285d8..601dbf6536 100644 --- a/harbour/tests/objarr.prg +++ b/harbour/tests/objarr.prg @@ -17,41 +17,41 @@ PROCEDURE Main() QOut( "Direct reference : ", ToChar( o:x ) ) - o:x[1] := "I am a data" - o:Get()[2] := "I am a method" + o:x[ 1 ] := "I am a data" + o:Get()[ 2 ] := "I am a method" QOut( "Assign text : ", ToChar( o:x ) ) - o:x[1] := 4 - o:Get()[2] := 4 + o:x[ 1 ] := 4 + o:Get()[ 2 ] := 4 QOut( "Assign 4 : ", ToChar( o:x ) ) - QOut( "Post increment : ", o:x[1] ++ , o:Get()[2] ++ ) - QOut( "After : ", o:x[1] , o:Get()[2] ) - QOut( "Pre decrement : ", -- o:x[1] , -- o:Get()[2] ) - QOut( "After : ", o:x[1] , o:Get()[2] ) + QOut( "Post increment : ", o:x[ 1 ]++ , o:Get()[ 2 ]++ ) + QOut( "After : ", o:x[ 1 ] , o:Get()[ 2 ] ) + QOut( "Pre decrement : ", --o:x[ 1 ] , --o:Get()[ 2 ] ) + QOut( "After : ", o:x[ 1 ] , o:Get()[ 2 ] ) - o:x[1] += 2 - o:Get()[2] += 2 + o:x[ 1 ] += 2 + o:Get()[ 2 ] += 2 QOut( "Plus 2 : ", ToChar( o:x ) ) - o:x[1] -= 3 - o:Get()[2] -= 3 + o:x[ 1 ] -= 3 + o:Get()[ 2 ] -= 3 QOut( "Minus 3 : ", ToChar( o:x ) ) - o:x[1] *= 3 - o:Get()[2] *= 3 + o:x[ 1 ] *= 3 + o:Get()[ 2 ] *= 3 QOut( "Times 3 : ", ToChar( o:x ) ) - o:x[1] /= 1.5 - o:Get()[2] /= 1.5 + o:x[ 1 ] /= 1.5 + o:Get()[ 2 ] /= 1.5 QOut( "Divide by 1.5 : ", ToChar( o:x ) ) - o:x[1] %= 4 - o:Get()[2] %= 4 + o:x[ 1 ] %= 4 + o:Get()[ 2 ] %= 4 QOut( "Modulus 4 : ", ToChar( o:x ) ) - o:x[1] ^= 3 - o:Get()[2] ^= 3 + o:x[ 1 ] ^= 3 + o:Get()[ 2 ] ^= 3 QOut( "To the power 3 : ", ToChar( o:x ) ) QOut( "Global stack" ) diff --git a/harbour/tests/onidle.prg b/harbour/tests/onidle.prg index 4c2de12a28..05cf8532d3 100644 --- a/harbour/tests/onidle.prg +++ b/harbour/tests/onidle.prg @@ -22,27 +22,27 @@ PROCEDURE Main() @ 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 Inkey( 30 ) - IF !Empty( nH3 ) + IF ! Empty( nH3 ) @ 14, 2 SAY "Delete task 3: " + hb_ValToStr( nH3 ) hb_idleDel( nH3 ) ENDIF - IF !Empty( nH2 ) + IF ! Empty( nH2 ) @ 15, 2 SAY "Delete task 2: " + hb_ValToStr( nH2 ) hb_idleDel( nH2 ) ENDIF - IF !Empty( nH1 ) + IF ! Empty( nH1 ) @ 16, 2 SAY "Delete task 1: " + hb_ValToStr( nH1 ) hb_idleDel( nH1 ) ENDIF - IF !Empty( nH4 ) + IF ! Empty( nH4 ) @ 17, 2 SAY "Delete task 4: " + hb_ValToStr( nH4 ) hb_idleDel( nH4 ) ENDIF diff --git a/harbour/tests/speedstr.prg b/harbour/tests/speedstr.prg index 658367616b..9325feaa6b 100644 --- a/harbour/tests/speedstr.prg +++ b/harbour/tests/speedstr.prg @@ -27,9 +27,9 @@ proc main() memvar p local i, t local l, o - static s, s2[1] + static s, s2[ 1 ] private p - p := s2[1] := s := l := "" + p := s2[ 1 ] := s := l := "" t := secondsCPU() for i := 1 to N_LOOP l += chr( i ) @@ -44,7 +44,7 @@ proc main() ? "STATIC +=", t, "sec." t := secondsCPU() for i := 1 to N_LOOP - s2[1] += chr( i ) + s2[ 1 ] += chr( i ) next t := secondsCPU() - t ? "ARRAY[] +=", t, "sec." diff --git a/harbour/tests/speedtst.prg b/harbour/tests/speedtst.prg index a5a55714e7..9393389a02 100644 --- a/harbour/tests/speedtst.prg +++ b/harbour/tests/speedtst.prg @@ -566,7 +566,7 @@ nTimeTotST := nTimeTotMT := 0 for j:=1 to nMT hb_mutexNotify( mtxJobs, i ) hb_mutexSubscribe( mtxResults,, @x ) - cTest := x[1] + cTest := x[ 1 ] next nTimeST := seconds() - nTimeST nTimeTotST += nTimeST @@ -578,7 +578,7 @@ nTimeTotST := nTimeTotMT := 0 next for j:=1 to nMT hb_mutexSubscribe( mtxResults,, @x ) - cTest := x[1] + cTest := x[ 1 ] next nTimeMT := seconds() - nTimeMT nTimeTotMT += nTimeMT @@ -706,8 +706,8 @@ static function errorArray() #endif static func dsp_result( aResult, nLoopOverHead ) - return padr( "[ " + left( aResult[1], 56 ) + " ]", 60, "." ) + ; - strtran( str( max( aResult[2] - nLoopOverHead, 0 ), 8, 2 ), " ", "." ) + return padr( "[ " + left( aResult[ 1 ], 56 ) + " ]", 60, "." ) + ; + strtran( str( max( aResult[ 2 ] - nLoopOverHead, 0 ), 8, 2 ), " ", "." ) static func dsp_scaleResult( cTest, nTimeST, nTimeMT, nMT, nLoopOverHead ) if .f. diff --git a/harbour/tests/switch.prg b/harbour/tests/switch.prg index ffd1aa310c..65ad870a98 100644 --- a/harbour/tests/switch.prg +++ b/harbour/tests/switch.prg @@ -69,7 +69,7 @@ PROCEDURE Main() CASE "a&b" CASE 1 + 1 - CASE { 11111111, 22222222222 }[1] + CASE { 11111111, 22222222222 }[ 1 ] CASE 1 + 1 + 1 ? "3" EXIT diff --git a/harbour/tests/testdbf.prg b/harbour/tests/testdbf.prg index ed6ecd69c3..f23f317f9e 100644 --- a/harbour/tests/testdbf.prg +++ b/harbour/tests/testdbf.prg @@ -58,13 +58,13 @@ PROCEDURE Main() MYALIAS->( dbCommit() ) ? "Records before ZAP:", MYALIAS->( LastRec() ) - ? "Size of files (data and memo):", Directory( "testdbf.dbf" )[1][2], ; - Directory( "testdbf.fpt" )[1][2] + ? "Size of files (data and memo):", Directory( "testdbf.dbf" )[ 1 ][ 2 ], ; + Directory( "testdbf.fpt" )[ 1 ][ 2 ] MYALIAS->( __dbZap() ) MYALIAS->( dbCommit() ) ? "Records after ZAP:", MYALIAS->( LastRec() ) - ? "Size of files (data and memo):", Directory( "testdbf.dbf" )[1][2], ; - Directory( "testdbf.fpt" )[1][2] + ? "Size of files (data and memo):", Directory( "testdbf.dbf" )[ 1 ][ 2 ], ; + Directory( "testdbf.fpt" )[ 1 ][ 2 ] ? "Value of fields MEMO1, MEMO2, DOUBLE and NUMERIC:" ? "[" + MYALIAS->MEMO1 + "]" ? "[" + MYALIAS->MEMO2 + "]" @@ -144,14 +144,14 @@ PROCEDURE Main() ? "Testing __dbPack()" ? "Records before PACK:", MYALIAS->( LastRec() ) - ? "Size of files (data and memo):", Directory( "testdbf.dbf" )[1][2], ; - Directory( "testdbf.dbt" )[1][2] + ? "Size of files (data and memo):", Directory( "testdbf.dbf" )[ 1 ][ 2 ], ; + Directory( "testdbf.dbt" )[ 1 ][ 2 ] SET FILTER TO MYALIAS->( __dbPack() ) MYALIAS->( dbCommit() ) ? "Records after PACK:", MYALIAS->( LastRec() ) - ? "Size of files (data and memo):", Directory( "testdbf.dbf" )[1][2], ; - Directory( "testdbf.dbt" )[1][2] + ? "Size of files (data and memo):", Directory( "testdbf.dbf" )[ 1 ][ 2 ], ; + Directory( "testdbf.dbt" )[ 1 ][ 2 ] ? "Press any key..." Inkey( 0 ) ? "Value of fields:" diff --git a/harbour/tests/testdecl.prg b/harbour/tests/testdecl.prg index 267d657ac0..78d7b5a49c 100644 --- a/harbour/tests/testdecl.prg +++ b/harbour/tests/testdecl.prg @@ -37,9 +37,9 @@ INIT PROCEDURE Main() DECLARE Var1 DECLARE Var2 := 2 - DECLARE aVar[2] - DECLARE Var3 := "Var9", Var4, aVar5[1] - DECLARE Var6, Var7:=7, aVar8[8] + DECLARE aVar[ 2 ] + DECLARE Var3 := "Var9", Var4, aVar5[ 1 ] + DECLARE Var6, Var7:=7, aVar8[ 8 ] DECLARE Var9 DECLARE &var3 DECLARE &Var3. @@ -54,8 +54,8 @@ INIT PROCEDURE Main() ? M->Var2 - M->aVar[1] := "Array Element" - ? M->aVar[1] + M->aVar[ 1 ] := "Array Element" + ? M->aVar[ 1 ] MyObj:cVar := "Hello" ? MyObj:cVar diff --git a/harbour/tests/testget.prg b/harbour/tests/testget.prg index 6fb882ea36..3fdd84f5e5 100644 --- a/harbour/tests/testget.prg +++ b/harbour/tests/testget.prg @@ -13,13 +13,13 @@ PROCEDURE Main() ? "2nd GET should say 'Early'." @ 10, 10 SAY "cVar :" GET cVar PICTURE "@K!" - @ 12, 10 SAY "cMacro[1] :" GET &cMacro[1] - @ 14, 10 SAY "cMacro.2[1] :" GET &cMacro.2[1] - @ 16, 10 SAY "cEarly[1] :" GET cEarly[1] -// @ 14,10 SAY "cMacro :" GET &(cMacro)[1] + @ 12, 10 SAY "cMacro[1] :" GET &cMacro[ 1 ] + @ 14, 10 SAY "cMacro.2[1] :" GET &cMacro.2[ 1 ] + @ 16, 10 SAY "cEarly[1] :" GET cEarly[ 1 ] +// @ 14,10 SAY "cMacro :" GET &(cMacro)[ 1 ] nIndex := 2 - @ 18, 10 SAY "aVar :" GET aVar[nIndex] - @ 20, 10 SAY "Picture of GET-1:" GET GetList[1]:Picture + @ 18, 10 SAY "aVar :" GET aVar[ nIndex ] + @ 20, 10 SAY "Picture of GET-1:" GET GetList[ 1 ]:Picture nIndex := 3 cMacro := "cLate" READ