From 7e7aaf9044879e3a3dd3f64bf43efd7bcd0d5e5f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 2 Oct 2012 11:59:22 +0000 Subject: [PATCH] 2012-10-02 13:52 UTC+0200 Viktor Szakats (harbour syenar.net) * tests/adirtest.prg * tests/ainstest.prg * tests/and_or.prg * tests/array16.prg * tests/arrayidx.prg * tests/arrays.prg * tests/arrindex.prg * tests/atest.prg * tests/base64.prg * tests/byref.prg * tests/calling.prg * tests/cdow.prg * tests/clasinit.prg * tests/clasname.prg * tests/classch.prg * tests/classes.prg * tests/clsdata.prg * tests/cmphello.prg * tests/codebl.prg * tests/curdirt.prg * tests/cursrtst.prg * tests/dates.prg * tests/dates2.prg * tests/dates3.prg * tests/debugtst.prg * tests/delimtst.prg * tests/devtest.prg * tests/dirtest.prg * tests/disptest.prg * tests/docase.prg * tests/dosshell.prg * tests/dttest.prg * tests/dupvars.prg * tests/dynobj.prg * tests/dynsym.prg * tests/exittest.prg * tests/extend1.prg * tests/fib.prg * tests/fornext.prg * tests/fortest.prg * tests/funcarr.prg * tests/hbdoctst.prg * tests/hsxtest.prg * tests/ifelse.prg * tests/inifiles.prg * tests/initexit.prg * tests/inkeytst.prg * tests/inline_c.prg * tests/inline.prg * tests/iotest.prg * tests/iotest2.prg * tests/ipclnt.prg * tests/ipsvr.prg * tests/longstr.prg * tests/mathtest.prg * tests/memvar.prg * tests/multiarg.prg * tests/nums.prg * tests/objarr.prg * tests/objasign.prg * tests/objects.prg * tests/os.prg * tests/overload.prg * tests/parexpr.prg * tests/passref.prg * tests/procname.prg * tests/recursiv.prg * tests/returns.prg * tests/round.prg * tests/sdf_test.prg * tests/seconds.prg * tests/set_num.prg * tests/set_test.prg * tests/sound.prg * tests/statfun.prg * tests/statics.prg * tests/statics1.prg * tests/statics2.prg * tests/strdelim.prg * tests/stripem.prg * tests/t1.prg * tests/test.prg * tests/testerro.prg * tests/testfor.prg * tests/testget.prg * tests/testhtml.prg * tests/testid.prg * tests/testop.prg * tests/teststr.prg * tests/testtok.prg * tests/testvars.prg * tests/tflock.prg * tests/tstalias.prg * tests/version.prg * tests/videotst.prg * tests/while.prg * tests/wvtext.prg ! various cleanups and fixes after running almost all of them * ChangeLog * changed hbqt new repository to its new location: http://sourceforge.net/projects/qtcontribs/ --- harbour/ChangeLog | 110 +++++++++- harbour/tests/adirtest.prg | 24 +-- harbour/tests/ainstest.prg | 42 ++-- harbour/tests/and_or.prg | 26 ++- harbour/tests/array16.prg | 40 ++-- harbour/tests/arrayidx.prg | 24 +-- harbour/tests/arrays.prg | 38 ++-- harbour/tests/arrindex.prg | 2 +- harbour/tests/atest.prg | 2 +- harbour/tests/base64.prg | 19 +- harbour/tests/byref.prg | 26 +-- harbour/tests/calling.prg | 8 +- harbour/tests/cdow.prg | 12 +- harbour/tests/clasinit.prg | 17 +- harbour/tests/clasname.prg | 36 ++-- harbour/tests/classch.prg | 12 +- harbour/tests/classes.prg | 4 +- harbour/tests/clsdata.prg | 20 +- harbour/tests/cmphello.prg | 15 +- harbour/tests/codebl.prg | 14 +- harbour/tests/curdirt.prg | 10 +- harbour/tests/cursrtst.prg | 2 +- harbour/tests/dates.prg | 84 ++++---- harbour/tests/dates2.prg | 42 ++-- harbour/tests/dates3.prg | 26 +-- harbour/tests/debugtst.prg | 82 +++---- harbour/tests/delimtst.prg | 11 +- harbour/tests/devtest.prg | 10 +- harbour/tests/dirtest.prg | 13 +- harbour/tests/disptest.prg | 9 +- harbour/tests/docase.prg | 22 +- harbour/tests/dosshell.prg | 22 +- harbour/tests/dttest.prg | 36 ++-- harbour/tests/dupvars.prg | 2 +- harbour/tests/dynobj.prg | 59 ++--- harbour/tests/dynsym.prg | 2 +- harbour/tests/exittest.prg | 4 +- harbour/tests/extend1.prg | 432 ++++++++++++++++++------------------- harbour/tests/fib.prg | 4 +- harbour/tests/fornext.prg | 26 +-- harbour/tests/fortest.prg | 23 +- harbour/tests/funcarr.prg | 35 +-- harbour/tests/hbdoctst.prg | 7 +- harbour/tests/hsxtest.prg | 40 ++-- harbour/tests/ifelse.prg | 28 +-- harbour/tests/inifiles.prg | 10 +- harbour/tests/initexit.prg | 32 +-- harbour/tests/inkeytst.prg | 3 +- harbour/tests/inline.prg | 2 +- harbour/tests/inline_c.prg | 4 +- harbour/tests/iotest.prg | 10 +- harbour/tests/iotest2.prg | 8 +- harbour/tests/ipclnt.prg | 10 +- harbour/tests/ipsvr.prg | 12 +- harbour/tests/longstr.prg | 4 +- harbour/tests/mathtest.prg | 102 ++++----- harbour/tests/memvar.prg | 172 +++++++-------- harbour/tests/multiarg.prg | 2 +- harbour/tests/nums.prg | 12 +- harbour/tests/objarr.prg | 35 +-- harbour/tests/objasign.prg | 33 +-- harbour/tests/objects.prg | 18 +- harbour/tests/os.prg | 2 +- harbour/tests/overload.prg | 78 ++----- harbour/tests/parexpr.prg | 36 ++-- harbour/tests/passref.prg | 12 +- harbour/tests/procname.prg | 2 +- harbour/tests/recursiv.prg | 7 +- harbour/tests/returns.prg | 12 +- harbour/tests/round.prg | 11 +- harbour/tests/sdf_test.prg | 11 +- harbour/tests/seconds.prg | 11 +- harbour/tests/set_num.prg | 3 +- harbour/tests/set_test.prg | 8 +- harbour/tests/sound.prg | 6 +- harbour/tests/statfun.prg | 6 +- harbour/tests/statics.prg | 16 +- harbour/tests/statics1.prg | 28 +-- harbour/tests/statics2.prg | 18 +- harbour/tests/strdelim.prg | 8 +- harbour/tests/stripem.prg | 24 +-- harbour/tests/t1.prg | 2 +- harbour/tests/test.prg | 10 +- harbour/tests/testerro.prg | 2 +- harbour/tests/testfor.prg | 6 +- harbour/tests/testget.prg | 8 +- harbour/tests/testhtml.prg | 2 - harbour/tests/testid.prg | 20 +- harbour/tests/testop.prg | 10 +- harbour/tests/teststr.prg | 158 +++++++------- harbour/tests/testtok.prg | 4 +- harbour/tests/testvars.prg | 2 +- harbour/tests/tflock.prg | 54 ++--- harbour/tests/tstalias.prg | 12 +- harbour/tests/version.prg | 6 +- harbour/tests/videotst.prg | 2 - harbour/tests/while.prg | 2 +- harbour/tests/wvtext.prg | 39 ++-- 98 files changed, 1347 insertions(+), 1282 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0ad5583e61..03dab8d5d7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,110 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-02 13:52 UTC+0200 Viktor Szakats (harbour syenar.net) + * tests/adirtest.prg + * tests/ainstest.prg + * tests/and_or.prg + * tests/array16.prg + * tests/arrayidx.prg + * tests/arrays.prg + * tests/arrindex.prg + * tests/atest.prg + * tests/base64.prg + * tests/byref.prg + * tests/calling.prg + * tests/cdow.prg + * tests/clasinit.prg + * tests/clasname.prg + * tests/classch.prg + * tests/classes.prg + * tests/clsdata.prg + * tests/cmphello.prg + * tests/codebl.prg + * tests/curdirt.prg + * tests/cursrtst.prg + * tests/dates.prg + * tests/dates2.prg + * tests/dates3.prg + * tests/debugtst.prg + * tests/delimtst.prg + * tests/devtest.prg + * tests/dirtest.prg + * tests/disptest.prg + * tests/docase.prg + * tests/dosshell.prg + * tests/dttest.prg + * tests/dupvars.prg + * tests/dynobj.prg + * tests/dynsym.prg + * tests/exittest.prg + * tests/extend1.prg + * tests/fib.prg + * tests/fornext.prg + * tests/fortest.prg + * tests/funcarr.prg + * tests/hbdoctst.prg + * tests/hsxtest.prg + * tests/ifelse.prg + * tests/inifiles.prg + * tests/initexit.prg + * tests/inkeytst.prg + * tests/inline_c.prg + * tests/inline.prg + * tests/iotest.prg + * tests/iotest2.prg + * tests/ipclnt.prg + * tests/ipsvr.prg + * tests/longstr.prg + * tests/mathtest.prg + * tests/memvar.prg + * tests/multiarg.prg + * tests/nums.prg + * tests/objarr.prg + * tests/objasign.prg + * tests/objects.prg + * tests/os.prg + * tests/overload.prg + * tests/parexpr.prg + * tests/passref.prg + * tests/procname.prg + * tests/recursiv.prg + * tests/returns.prg + * tests/round.prg + * tests/sdf_test.prg + * tests/seconds.prg + * tests/set_num.prg + * tests/set_test.prg + * tests/sound.prg + * tests/statfun.prg + * tests/statics.prg + * tests/statics1.prg + * tests/statics2.prg + * tests/strdelim.prg + * tests/stripem.prg + * tests/t1.prg + * tests/test.prg + * tests/testerro.prg + * tests/testfor.prg + * tests/testget.prg + * tests/testhtml.prg + * tests/testid.prg + * tests/testop.prg + * tests/teststr.prg + * tests/testtok.prg + * tests/testvars.prg + * tests/tflock.prg + * tests/tstalias.prg + * tests/version.prg + * tests/videotst.prg + * tests/while.prg + * tests/wvtext.prg + ! various cleanups and fixes after running almost all of them + + * ChangeLog + * changed hbqt new repository to its new location: + http://sourceforge.net/projects/qtcontribs/ + 2012-10-02 11:26 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbnf/popadder.prg * src/rtl/listbox.prg @@ -744,7 +848,7 @@ * utils/hbmk2/examples/plug_bis.hb % minor cleanup - contrib/hbnetio/utils/hbnetioq - - deleted (find it here or from repo history: http://sourceforge.net/projects/hbqt/) + - deleted (find it here or from repo history: http://sourceforge.net/projects/qtcontribs/) * utils/hbmk2/examples/contribf.hbc * updated @@ -853,7 +957,7 @@ - deleted hbqt, hbxbp, hbide as final step of contrib split to separate project. find them in this (temporary) repository: - http://sourceforge.net/projects/hbqt/ + http://sourceforge.net/projects/qtcontribs/ or checkout from Harbour repository using: svn co -r 18153 https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour @@ -1434,7 +1538,7 @@ * contrib/hbplist * disabled HBQT, HBXBP and HBIDE components. See this place for their new home: - http://sourceforge.net/projects/hbqt/ + http://sourceforge.net/projects/qtcontribs/ 2012-09-24 10:39 UTC+0200 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg diff --git a/harbour/tests/adirtest.prg b/harbour/tests/adirtest.prg index 3d9a9f66e4..c47242757d 100644 --- a/harbour/tests/adirtest.prg +++ b/harbour/tests/adirtest.prg @@ -20,12 +20,12 @@ STATIC FUNCTION TestIt( cSpec ) LOCAL a4 LOCAL a5 - // In order to account for documented behavour, this call will ensure - // that Adir() returns the same length array in both cases. - // ie: adir( cSpec ) could return a different length array than - // ADIR( cSpec,,,,,{} ) +// In order to account for documented behavour, this call will ensure +// that Adir() returns the same length array in both cases. +// ie: adir( cSpec ) could return a different length array than +// ADir( cSpec,,,,,{} ) - a := ADIR( cSpec,,,,,{} ) + a := ADir( cSpec, , , , , {} ) SET DATE ANSI SET CENTURY ON @@ -39,14 +39,14 @@ STATIC FUNCTION TestIt( cSpec ) OutStd( "--------------------------------------------------------" ) OutStd( hb_eol() ) - ADIR( cSpec , a1, a2, a3, a4, a5 ) + ADir( cSpec , a1, a2, a3, a4, a5 ) - aEval(a1, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } ) - aEval(a2, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } ) - aEval(a3, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } ) - aEval(a4, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } ) - aEval(a5, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } ) + AEval( a1, {| tmp | OutStd( tmp ), OutStd( hb_eol() ) } ) + AEval( a2, {| tmp | OutStd( tmp ), OutStd( hb_eol() ) } ) + AEval( a3, {| tmp | OutStd( tmp ), OutStd( hb_eol() ) } ) + AEval( a4, {| tmp | OutStd( tmp ), OutStd( hb_eol() ) } ) + AEval( a5, {| tmp | OutStd( tmp ), OutStd( hb_eol() ) } ) - ADIR( cSpec, 10, "A", NIL, NIL, NIL ) + ADir( cSpec, 10, "A", NIL, NIL, NIL ) RETURN NIL diff --git a/harbour/tests/ainstest.prg b/harbour/tests/ainstest.prg index 9d10ee08be..143e2e452d 100644 --- a/harbour/tests/ainstest.prg +++ b/harbour/tests/ainstest.prg @@ -15,44 +15,44 @@ PROCEDURE Main() aFirst := AClone( { 1, 2, 4 } ) AIns( aFirst, 3 ) aFirst[ 3 ] := "3" - QQOut( "Testing aIns .. " ) + ?? "Testing aIns .. " aDump( aFirst ) aSecond := { 1, 2, 4 } ASize( aSecond, 4 ) - QQOut( "Testing aSize .. " ) + ?? "Testing aSize .. " aDump( aSecond ) aSecond := { 1, 2, 4 } ASize( aSecond, 4 ) AIns( aSecond, 3 ) aSecond[ 3 ] := "3" - QQOut( "Testing aSize + aIns .. " ) + ?? "Testing aSize + aIns .. " aDump( aSecond ) aSecond := { 1, 2, 3, 3, 4, 5 } ADel( aSecond, 3 ) - QQOut( "Testing aDel .. " ) + ?? "Testing aDel .. " aDump( aSecond ) aSecond := { 1, 2, 3, 3, 4, 5 } ADel( aSecond, 3 ) ASize( aSecond, Len( aSecond ) - 1 ) - QQOut( "Testing aSize + aDel .. " ) + ?? "Testing aSize + aDel .. " aDump( aSecond ) AFill( aSecond, "!" ) - QQOut( "Testing aFill .. " ) + ?? "Testing aFill .. " aDump( aSecond ) aMore := { 1, 2, 3, 4, 5, 6 } AFill( aMore, "X", 3 ) - QQOut( "Testing aFill with start .. " ) + ?? "Testing aFill with start .. " aDump( aMore ) aMore := { 1, 2, 3, 4, 5, 6 } AFill( aMore, "X", 3, 2 ) - QQOut( "Testing aFill with start and count .. " ) + ?? "Testing aFill with start and count .. " aDump( aMore ) aMore := { { 1, 2 }, { 3, 4 } } @@ -65,29 +65,29 @@ FUNCTION aDump( aShow ) LOCAL n - QQOut( "Len=", hb_ntos( Len( aShow ) ) ) - QQOut( ": " ) + ?? "Len=", hb_ntos( Len( aShow ) ) + ?? ": " FOR n := 1 TO Len( aShow ) - QQOut( "[" ) - QQOut( hb_ntos( n ) ) - QQOut( "]= " ) - QQOut( ValType( aShow[ n ] ) ) - QQOut( ":" ) + ?? "[" + ?? hb_ntos( n ) + ?? "]= " + ?? ValType( aShow[ n ] ) + ?? ":" IF ValType( aShow[ n ] ) == "A" /* Iterate array */ - QQOut( hb_eol() ) - QQOut( "[" ) + ?? hb_eol() + ?? "[" aDump( aShow[ n ] ) - QQOut( "]" ) + ?? "]" ELSE - QQOut( aShow[ n ] ) + ?? aShow[ n ] ENDIF IF n != Len( aShow ) - QQOut( ", " ) + ?? ", " ENDIF NEXT - QQOut( hb_eol() ) + ?? hb_eol() RETURN NIL diff --git a/harbour/tests/and_or.prg b/harbour/tests/and_or.prg index 263e05e86a..cf3d499b36 100644 --- a/harbour/tests/and_or.prg +++ b/harbour/tests/and_or.prg @@ -6,37 +6,43 @@ PROCEDURE Main() - QOut( "Testing logical shortcuts" ) + ? "Testing logical shortcuts" - IF .F. .AND. QOut( "this should not show!" ) // and it should not break! + IF .F. .AND. DispAndReturnNIL() // and it should not break! ENDIF - QOut( "Testing .t. .t." ) + ? "Testing .t. .t." AndOr( .T. , .T. ) - QOut( "Testing .t. .f." ) + ? "Testing .t. .f." AndOr( .T. , .F. ) - QOut( "Testing .f. .f." ) + ? "Testing .f. .f." AndOr( .F. , .F. ) - QOut( "Testing errors..." ) + ? "Testing errors..." AndOr( 1, .T. ) RETURN +FUNCTION DispAndReturnNIL() + + QOut( "this should not show!" ) + + RETURN NIL + FUNCTION AndOr( lValue1, lValue2 ) IF lValue1 .AND. lValue2 - QOut( "They are both true" ) + ? "They are both true" ELSE - QOut( "They are not both true" ) + ? "They are not both true" ENDIF IF lValue1 .OR. lValue2 - QOut( "At least one of them is true" ) + ? "At least one of them is true" ELSE - QOut( "None of them are true" ) + ? "None of them are true" ENDIF RETURN NIL diff --git a/harbour/tests/array16.prg b/harbour/tests/array16.prg index 27f3fde77d..f382e837d9 100644 --- a/harbour/tests/array16.prg +++ b/harbour/tests/array16.prg @@ -9,52 +9,52 @@ PROCEDURE Main() LOCAL a := { 100, 200, "Third" } LOCAL b := Array( 8832 ) // 8832 elements !!! Maximum for 16 Bit !!! - QOut( ValType( a ) ) - QOut( ValType( { "A" } ) ) + ? ValType( a ) + ? ValType( { "A" } ) AAdd( a, "new element" ) - QOut( Len( a ) ) + ? Len( a ) - QOut( a[ 1 ] ) - QOut( a[ 2 ] ) - QOut( a[ 3 ] ) - QOut( a[ 4 ] ) + ? a[ 1 ] + ? a[ 2 ] + ? a[ 3 ] + ? a[ 4 ] - QOut( ATail( a ) ) + ? ATail( a ) a[ 3 ] := { "this", { "seems", "to", { "work", "so", "well" } } } - QOut( a[ 3 ][ 2 ][ 3 ][ 1 ] ) // "work" + ? a[ 3 ][ 2 ][ 3 ][ 1 ] // "work" a[ 3, 2 ][ 3, 1 ] := "Harbour power!" // different ways to specify the indexes - QOut( a[ 3, 2, 3, 1 ] ) + ? a[ 3, 2, 3, 1 ] - QOut( ValType( b ) ) - QOut( Len( b ) ) + ? ValType( b ) + ? Len( b ) b[ 8832 ] := "Harbour" - QOut( b[ 8832 ] ) + ? b[ 8832 ] - QOut( ATail( b ) ) + ? ATail( b ) ASize( b, 200 ) - QOut( Len( b ) ) + ? Len( b ) b[ 100 ] := 10 Test( b[ 100 ]++ ) - QOut( b[ 100 ] ) + ? b[ 100 ] b[ 100 ] := 10 Test( ++b[ 100 ] ) - QOut( b[ 100 ] ) + ? b[ 100 ] b := { 1, { 2, { 4, 5 } } } Test( b[ 2 ][ 2 ][ 1 ]++ ) - QOut( b[ 2 ][ 2 ][ 1 ] ) + ? b[ 2 ][ 2 ][ 1 ] b[ 2 ][ 2 ][ 1 ] := 2 Test( ++b[ 2 ][ 2 ][ 1 ] ) - QOut( b[ 2 ][ 2 ][ 1 ] ) + ? b[ 2 ][ 2 ][ 1 ] ReleaseTest() @@ -62,7 +62,7 @@ PROCEDURE Main() FUNCTION Test( n ) - QOut( n ) + ? n RETURN NIL diff --git a/harbour/tests/arrayidx.prg b/harbour/tests/arrayidx.prg index c1f19e149c..c36294c15c 100644 --- a/harbour/tests/arrayidx.prg +++ b/harbour/tests/arrayidx.prg @@ -15,17 +15,17 @@ PROCEDURE Main() LOCAL aList := { 1, 2, 3, 4, 5, 6 } - QOut( aList[ 1 ] += 5 ) - QOut( aList[ 1 ] ) - QOut( aList[ 2 ] -= 5 ) - QOut( aList[ 2 ] ) - QOut( aList[ 3 ] *= 5 ) - QOut( aList[ 3 ] ) - QOut( aList[ 4 ] /= 5 ) - QOut( aList[ 4 ] ) - QOut( aList[ 5 ] ^= 5 ) - QOut( aList[ 5 ] ) - QOut( aList[ 6 ] %= 5 ) - QOut( aList[ 6 ] ) + ? aList[ 1 ] += 5 + ? aList[ 1 ] + ? aList[ 2 ] -= 5 + ? aList[ 2 ] + ? aList[ 3 ] *= 5 + ? aList[ 3 ] + ? aList[ 4 ] /= 5 + ? aList[ 4 ] + ? aList[ 5 ] ^= 5 + ? aList[ 5 ] + ? aList[ 6 ] %= 5 + ? aList[ 6 ] RETURN diff --git a/harbour/tests/arrays.prg b/harbour/tests/arrays.prg index cc0ad71f2f..ab55aa6d0d 100644 --- a/harbour/tests/arrays.prg +++ b/harbour/tests/arrays.prg @@ -9,50 +9,50 @@ PROCEDURE Main() LOCAL a := { 100, 200, "Third" } LOCAL b := Array( 10000 ) // 10.000 elements !!! - QOut( ValType( a ) ) - QOut( ValType( { "A" } ) ) + ? ValType( a ) + ? ValType( { "A" } ) AAdd( a, "new element" ) - QOut( Len( a ) ) + ? Len( a ) - QOut( a[ 1 ] ) - QOut( a[ 2 ] ) - QOut( a[ 3 ] ) - QOut( a[ 4 ] ) + ? a[ 1 ] + ? a[ 2 ] + ? a[ 3 ] + ? a[ 4 ] - QOut( ATail( a ) ) + ? ATail( a ) a[ 3 ] := { "this", { "seems", "to", { "work", "so", "well" } } } - QOut( a[ 3 ][ 2 ][ 3 ][ 1 ] ) // "work" + ? a[ 3 ][ 2 ][ 3 ][ 1 ] // "work" a[ 3, 2 ][ 3, 1 ] := "Harbour power!" // different ways to specify the indexes - QOut( a[ 3, 2, 3, 1 ] ) + ? a[ 3, 2, 3, 1 ] - QOut( ValType( b ) ) - QOut( Len( b ) ) + ? ValType( b ) + ? Len( b ) b[ 8000 ] := "Harbour" - QOut( b[ 8000 ] ) + ? b[ 8000 ] ASize( b, 2000 ) - QOut( Len( b ) ) + ? Len( b ) b[ 1000 ] := 10 Test( b[ 1000 ]++ ) - QOut( b[ 1000 ] ) + ? b[ 1000 ] b[ 1000 ] := 10 Test( ++b[ 1000 ] ) - QOut( b[ 1000 ] ) + ? b[ 1000 ] b := { 1, { 2, { 4, 5 } } } Test( b[ 2 ][ 2 ][ 1 ]++ ) - QOut( b[ 2 ][ 2 ][ 1 ] ) + ? b[ 2 ][ 2 ][ 1 ] b[ 2 ][ 2 ][ 1 ] := 2 Test( ++b[ 2 ][ 2 ][ 1 ] ) - QOut( b[ 2 ][ 2 ][ 1 ] ) + ? b[ 2 ][ 2 ][ 1 ] ReleaseTest() @@ -60,7 +60,7 @@ PROCEDURE Main() FUNCTION Test( n ) - QOut( n ) + ? n RETURN NIL diff --git a/harbour/tests/arrindex.prg b/harbour/tests/arrindex.prg index 26ccecfd72..ababf2bc9b 100644 --- a/harbour/tests/arrindex.prg +++ b/harbour/tests/arrindex.prg @@ -14,6 +14,6 @@ PROCEDURE Main() b := a[ c[ 1 ] ][ val( [ 2 ] ) ] - QOut( b ) + ? b RETURN diff --git a/harbour/tests/atest.prg b/harbour/tests/atest.prg index 648aa3f33f..003c526403 100644 --- a/harbour/tests/atest.prg +++ b/harbour/tests/atest.prg @@ -11,6 +11,6 @@ PROCEDURE Main() a[ 1 ] := a a[ 1 ] := NIL - QOut( "The array will try to be released now..." ) + ? "The array will try to be released now..." RETURN diff --git a/harbour/tests/base64.prg b/harbour/tests/base64.prg index 174da40eda..c5a5b366b0 100644 --- a/harbour/tests/base64.prg +++ b/harbour/tests/base64.prg @@ -4,9 +4,6 @@ /* RFC4648 test vectors for base64 */ -#pragma warninglevel=3 -#pragma exitseverity=2 - REQUEST HB_GT_CGI_DEFAULT PROCEDURE Main() @@ -26,21 +23,19 @@ PROCEDURE Main() cStr := hb_base64encode( aVector:__enumKey ) IF cStr != aVector - OutStd( hb_strFormat( "hb_base64encode(): expected '%s' got '%s' while encoding '%s'" + hb_eol(), ; - aVector:__enumKey(), cStr, aVector ) ) + ? hb_strFormat( "hb_base64encode(): expected '%s' got '%s' while encoding '%s'", ; + aVector:__enumKey(), cStr, aVector ) ELSE - OutStd( hb_strFormat( "hb_base64encode(): passed '%s'" + hb_eol(), aVector:__enumKey ) ) + ? hb_strFormat( "hb_base64encode(): passed '%s'", aVector:__enumKey ) ENDIF cStr := hb_base64decode( aVector ) IF cStr != aVector:__enumKey() - OutStd( hb_strFormat( "hb_base64decode(): expected '%s' got '%s' while decoding '%s'" + hb_eol(), ; - aVector, cStr, aVector:__enumKey() ) ) + ? hb_strFormat( "hb_base64decode(): expected '%s' got '%s' while decoding '%s'", ; + aVector, cStr, aVector:__enumKey() ) ELSE - OutStd( hb_strFormat( "hb_base64decode(): passed '%s'" + hb_eol(), aVector ) ) - ENDIF + ? hb_strFormat( "hb_base64decode(): passed '%s'", aVector ) + ENDIF NEXT RETURN - - diff --git a/harbour/tests/byref.prg b/harbour/tests/byref.prg index d9074c92c1..7b369a1a47 100644 --- a/harbour/tests/byref.prg +++ b/harbour/tests/byref.prg @@ -10,34 +10,34 @@ PROCEDURE Main() LOCAL x := 0 - QOut( "Managing LOCAL variables by reference" ) - QOut( "In main before ref1 x=", x ) + ? "Managing LOCAL variables by reference" + ? "In main before ref1 x=", x ref1( @x ) - QOut( " In main after ref1 x=", x ) + ? " In main after ref1 x=", x - QOut( "Managing STATIC variables by reference" ) - QOut( "In main before ref1 s=", s ) + ? "Managing STATIC variables by reference" + ? "In main before ref1 s=", s ref1( @s ) - QOut( " In main after ref1 s=", s ) + ? " In main after ref1 s=", s RETURN FUNCTION ref1( x ) x++ - QOut( " In ref1 before ref2 =", x ) + ? " In ref1 before ref2 =", x Ref2( @x ) - QOut( " In ref1 after ref2 =", x ) + ? " In ref1 after ref2 =", x RETURN NIL FUNCTION ref2( x ) x++ - QOut( " In ref2 before ref3 =", x ) + ? " In ref2 before ref3 =", x Ref3( @x ) - QOut( " In ref2 after ref3 =", x ) + ? " In ref2 after ref3 =", x RETURN NIL @@ -46,16 +46,16 @@ FUNCTION ref3( x ) STATIC a x++ - QOut( " In ref3 before ref4 =", x ) + ? " In ref3 before ref4 =", x a := { x, x } Ref4( @a ) - QOut( " In ref3 after ref4 =", x ) + ? " In ref3 after ref4 =", x RETURN NIL FUNCTION ref4( a ) a[ 1 ]++ - QOut( " In ref4 =", a[ 1 ] ) + ? " In ref4 =", a[ 1 ] RETURN NIL diff --git a/harbour/tests/calling.prg b/harbour/tests/calling.prg index d57b8fd5b2..bc2bbc1407 100644 --- a/harbour/tests/calling.prg +++ b/harbour/tests/calling.prg @@ -10,13 +10,13 @@ PROCEDURE Main() DO Fourth WITH "from Fourth() function" // Testing the old fashion DO ... - QOut( "Ok, back to Main()" ) + ? "Ok, back to Main()" RETURN FUNCTION SecondOne() - QOut( "Ok, this is from Second() function call" ) + ? "Ok, this is from Second() function call" Third() @@ -24,12 +24,12 @@ FUNCTION SecondOne() FUNCTION Third() - QOut( "Ok, this is from Third() function call" ) + ? "Ok, this is from Third() function call" RETURN NIL FUNCTION Fourth( cText ) - QOut( cText ) + ? cText RETURN NIL diff --git a/harbour/tests/cdow.prg b/harbour/tests/cdow.prg index b06633a179..24feaff836 100644 --- a/harbour/tests/cdow.prg +++ b/harbour/tests/cdow.prg @@ -4,12 +4,12 @@ PROCEDURE Main() - OutStd( cMonth( date() ) + hb_eol() ) - OutStd( cMonth( date() + 31 ) + hb_eol() ) - OutStd( cMonth( date() + 60 ) + hb_eol() ) + ? CMonth( Date() ) + ? CMonth( Date() + 31 ) + ? CMonth( Date() + 60 ) - OutStd( cDow( date() ) + hb_eol() ) - OutStd( cDow( date() + 6 ) + hb_eol() ) - OutStd( cDow( date() + 7 ) + hb_eol() ) + ? CDow( Date() ) + ? CDow( Date() + 6 ) + ? CDow( Date() + 7 ) RETURN diff --git a/harbour/tests/clasinit.prg b/harbour/tests/clasinit.prg index d9e811d663..610e44b90f 100644 --- a/harbour/tests/clasinit.prg +++ b/harbour/tests/clasinit.prg @@ -9,18 +9,18 @@ PROCEDURE Main() LOCAL oForm := TForm():New() LOCAL oSecond - QOut( "What's the default oForm and calculate area" ) + ? "What's the default oForm and calculate area" Debug( oForm ) - QOut( oForm:CalcArea() ) - QOut( "Set nTop to 5 and recalculate" ) + ? oForm:CalcArea() + ? "Set nTop to 5 and recalculate" oForm:nTop := 5 Debug( oForm ) - QOut( oForm:CalcArea() ) + ? oForm:CalcArea() - QOut( "Create a new instance and calculate area" ) + ? "Create a new instance and calculate area" oSecond := TForm():New() Debug( oSecond ) - QOut( oSecond:CalcArea() ) + ? oSecond:CalcArea() RETURN @@ -57,6 +57,9 @@ STATIC FUNCTION Show() LOCAL Self := QSelf() - QOut( "lets show a form from here :-)" ) + ? "lets show a form from here :-)" RETURN NIL + +STATIC PROCEDURE Debug() + RETURN diff --git a/harbour/tests/clasname.prg b/harbour/tests/clasname.prg index ac854b9dc2..1dac3215d2 100644 --- a/harbour/tests/clasname.prg +++ b/harbour/tests/clasname.prg @@ -21,36 +21,36 @@ PROCEDURE Main() ? - QOut( NIL:className ) - QOut( {}:className ) - QOut( "":className ) - QOut( 0:className ) - QOut( CToD( "" ):className ) - QOut( .F. :className ) - QOut( {|| NIL }:className ) - QOut( ErrorNew():className ) + ? NIL:className + ? {}:className + ? "":className + ? 0:className + ? CToD( "" ):className + ? .F. :className + ? {|| NIL }:className + ? ErrorNew():className // For fun, do it again while ensuring the parser doesn't care about // whitespace. ? - QOut( NIL : className ) - QOut( {} : className ) - QOut( "" : className ) - QOut( 0 : className ) - QOut( CToD( "" ) : className ) - QOut( .F. : className ) - QOut( {|| NIL } : className ) - QOut( ErrorNew() : className ) + ? NIL : className + ? {} : className + ? "" : className + ? 0 : className + ? CToD( "" ) : className + ? .F. : className + ? {|| NIL } : className + ? ErrorNew() : className // Now for some sillier ones. If the above work the following should // work too. ? - QOut( ( NIL:className ):className ) + ? ( NIL:className ):className ? - QOut( ( ( NIL:className ):className ):className ) + ? ( ( NIL:className ):className ):className RETURN diff --git a/harbour/tests/classch.prg b/harbour/tests/classch.prg index 87f23f552c..c8fb4bd091 100644 --- a/harbour/tests/classch.prg +++ b/harbour/tests/classch.prg @@ -6,7 +6,7 @@ #include "hbclass.ch" -//--------------------------------------------------------------------// +// ; PROCEDURE Main() @@ -20,7 +20,7 @@ PROCEDURE Main() RETURN -//--------------------------------------------------------------------// +// ; CREATE CLASS TTest INHERIT TParent @@ -32,7 +32,7 @@ CREATE CLASS TTest INHERIT TParent ENDCLASS -//--------------------------------------------------------------------// +// ; METHOD New( One, Two ) CLASS TTest @@ -43,7 +43,7 @@ METHOD New( One, Two ) CLASS TTest RETURN Self -//--------------------------------------------------------------------// +// ; CREATE CLASS TParent @@ -53,7 +53,7 @@ CREATE CLASS TParent ENDCLASS -//--------------------------------------------------------------------// +// ; METHOD New() CLASS TParent @@ -61,4 +61,4 @@ METHOD New() CLASS TParent RETURN Self -//--------------------------------------------------------------------// +// ; diff --git a/harbour/tests/classes.prg b/harbour/tests/classes.prg index c39af9d3e8..a772030ca4 100644 --- a/harbour/tests/classes.prg +++ b/harbour/tests/classes.prg @@ -8,7 +8,7 @@ PROCEDURE Main() LOCAL oForm := TForm():New() - QOut( oForm:ClassName() ) + ? oForm:ClassName() oForm:Show() @@ -50,6 +50,6 @@ STATIC FUNCTION Show() LOCAL Self := QSelf() - QOut( "lets show a form from here :-)" ) + ? "lets show a form from here :-)" RETURN NIL diff --git a/harbour/tests/clsdata.prg b/harbour/tests/clsdata.prg index 5a5f1f2435..4ea61a30b7 100644 --- a/harbour/tests/clsdata.prg +++ b/harbour/tests/clsdata.prg @@ -6,10 +6,10 @@ PROCEDURE Main() LOCAL o := HBObject():New() - QOut( "o:Data1 => ", o:Data1 ) - QOut( "o:ClassData1 => ", o:ClassData1 ) - QOut( "o:Data2 => ", o:Data2 ) - QOut( "o:ClassData2 => ", o:ClassData2 ) + ? "o:Data1 => ", o:Data1 + ? "o:ClassData1 => ", o:ClassData1 + ? "o:Data2 => ", o:Data2 + ? "o:ClassData2 => ", o:ClassData2 o:Test() RETURN @@ -44,8 +44,8 @@ STATIC FUNCTION Test() LOCAL self := QSelf() - QOut( "Inside ::Test() " ) - QOut( "calling ::Method1() " ) + ? "Inside ::Test()" + ? "calling ::Method1()" ::Method1() RETURN self @@ -54,7 +54,7 @@ STATIC FUNCTION Method1Base() LOCAL self := QSelf() - QOut( "I am Method1 from TBaseObject" ) + ? "I am Method1 from TBaseObject" ::Method2() RETURN self @@ -63,7 +63,7 @@ STATIC FUNCTION Method2Base() LOCAL self := QSelf() - QOut( "I am Method2 from TBaseObject" ) + ? "I am Method2 from TBaseObject" RETURN self @@ -100,7 +100,7 @@ STATIC FUNCTION Method1() LOCAL self := QSelf() - QOut( "I am Method1 from HBObject" ) + ? "I am Method1 from HBObject" ::TBaseObject:Method1() RETURN self @@ -109,6 +109,6 @@ STATIC FUNCTION Method2() LOCAL self := QSelf() - QOut( "I am Method2 from HBObject" ) + ? "I am Method2 from HBObject" RETURN self diff --git a/harbour/tests/cmphello.prg b/harbour/tests/cmphello.prg index 8246087a80..e0d1a8b10e 100644 --- a/harbour/tests/cmphello.prg +++ b/harbour/tests/cmphello.prg @@ -15,16 +15,9 @@ PROCEDURE Main() - LOCAL cOs := Upper( OS() ) - - QOut( "About to compile Hello.prg" ) - QOut() - IF At( "WINDOWS", cOs ) != 0 .OR. At( "DOS", cOs ) != 0 .OR. ; - At( "OS/2", cOs ) != 0 // OS/2, DOS, Windows version - __Run( "..\bin\harbour.exe hello.prg /gHRB" ) - ELSE // Unix / Linux version - __Run( "../bin/harbour hello.prg /gHRB" ) - ENDIF - QOut( "Finished compiling" ) + ? "About to compile hello.prg" + ? + hb_run( ".." + hb_ps() + "bin" + hb_ps() + "harbour hello.prg -gh" ) + ? "Finished compiling" RETURN diff --git a/harbour/tests/codebl.prg b/harbour/tests/codebl.prg index fce1c70ef5..2af8fb2166 100644 --- a/harbour/tests/codebl.prg +++ b/harbour/tests/codebl.prg @@ -9,10 +9,10 @@ PROCEDURE Main() LOCAL a := TestBlocks() LOCAL cb - QOut( Eval( a[ 1 ] ) ) // 23 - QOut( Eval( a[ 2 ], 42 ) ) // 42 - QOut( Eval( a[ 1 ] ) ) // 42 - QOut( Eval( a[ 2 ], 15 ) ) // 15 + ? Eval( a[ 1 ] ) // 23 + ? Eval( a[ 2 ], 42 ) // 42 + ? Eval( a[ 1 ] ) // 42 + ? Eval( a[ 2 ], 15 ) // 15 mqout( 15, Eval( a[ 1 ] ) ) // 15 15 mqout( 14, Eval( a[ 1 ] ) ) // 14 15 @@ -24,10 +24,10 @@ PROCEDURE Main() GetArray( @a ) PrintArray( @a ) - QOut( "Test for variables passed by reference in a codeblock" ) + ? "Test for variables passed by reference in a codeblock" DetachWithRefer() - QOut( "Test for indirect detaching of local variables" ) + ? "Test for indirect detaching of local variables" DetachToStatic( 1 ) mqout( 2, Eval( s_cbStatic, 1 ) ) mqout( 3, Eval( s_cbStatic, 2 ) ) @@ -49,7 +49,7 @@ STATIC FUNCTION TestBlocks() STATIC FUNCTION mqout( nExpected, nGot ) - QOut( nExpected, nGot ) + ? nExpected, nGot RETURN NIL diff --git a/harbour/tests/curdirt.prg b/harbour/tests/curdirt.prg index fb7ba9c6e3..274f4afad4 100644 --- a/harbour/tests/curdirt.prg +++ b/harbour/tests/curdirt.prg @@ -4,10 +4,10 @@ PROCEDURE Main() - OutStd( CurDir() + hb_eol() ) - OutStd( CurDir( "C" ) + hb_eol() ) - OutStd( CurDir( "C:" ) + hb_eol() ) - OutStd( CurDir( "D:" ) + hb_eol() ) - OutStd( CurDir( "A" ) + hb_eol() ) + ? CurDir() + ? CurDir( "C" ) + ? CurDir( "C:" ) + ? CurDir( "D:" ) + ? CurDir( "A" ) RETURN diff --git a/harbour/tests/cursrtst.prg b/harbour/tests/cursrtst.prg index 5b04d253f1..d8876ca339 100644 --- a/harbour/tests/cursrtst.prg +++ b/harbour/tests/cursrtst.prg @@ -2,7 +2,7 @@ * $Id$ */ -PROCEDURE main() +PROCEDURE Main() LOCAL x diff --git a/harbour/tests/dates.prg b/harbour/tests/dates.prg index 46802d2034..f6688cfb6f 100644 --- a/harbour/tests/dates.prg +++ b/harbour/tests/dates.prg @@ -10,82 +10,84 @@ PROCEDURE Main() LOCAL dDate, dDate2, cMask, cDate - OutStd( hb_eol(), "Testing Harbour dates management on", Date() ) + ? "Testing Harbour dates management on", Date() TestCentury() - OutStd( hb_eol(), "" ) - OutStd( hb_eol(), "dDate := CToD( '02/04/1999' ) =>", dDate := CToD( "02/04/1999" ) ) + ? + ? "dDate := CToD( '02/04/1999' ) =>", dDate := CToD( "02/04/1999" ) - OutStd( hb_eol(), "ValType( dDate ) =", ValType( dDate ) ) + ? "ValType( dDate ) =", ValType( dDate ) - OutStd( hb_eol(), "Day( dDate ) =", Day( dDate ) ) - OutStd( hb_eol(), "Month( dDate ) =", Month( dDate ) ) - OutStd( hb_eol(), "Year( dDate ) =", Year( dDate ), hb_eol() ) + ? "Day( dDate ) =", Day( dDate ) + ? "Month( dDate ) =", Month( dDate ) + ? "Year( dDate ) =", Year( dDate ) + ? - OutStd( hb_eol(), "dDate + 5 =", dDate2 := dDate + 5 ) - OutStd( hb_eol(), "dDate - 5 =", dDate - 5, hb_eol() ) + ? "dDate + 5 =", dDate2 := dDate + 5 + ? "dDate - 5 =", dDate - 5 + ? - OutStd( hb_eol(), "dDate2 - dDate =", dDate2 - dDate ) + ? "dDate2 - dDate =", dDate2 - dDate - OutStd( hb_eol(), "" ) - OutStd( hb_eol(), dDate, DToS( dDate ) ) + ? + ? dDate, DToS( dDate ) - OutStd( hb_eol(), "19990429", SToD( "19990429" ) ) + ? "19990429", SToD( "19990429" ) - OutStd( hb_eol(), "" ) - SET( _SET_EPOCH, 1950 ) + ? + Set( _SET_EPOCH, 1950 ) cMask := "dd/mm/yyyy" cDate := "02/04/49" - SET( _SET_DATEFORMAT, cMask ) + Set( _SET_DATEFORMAT, cMask ) dDate := CToD( cDate ) - OutStd( hb_eol(), cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) ) + ? cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) - OutStd( hb_eol(), "" ) + ? cMask := "mm/dd/yyyy" - SET( _SET_DATEFORMAT, cMask ) + Set( _SET_DATEFORMAT, cMask ) dDate := CToD( cDate ) - OutStd( hb_eol(), cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) ) + ? cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) - OutStd( hb_eol(), "" ) + ? cMask := "yyyy/mm/dd" - SET( _SET_DATEFORMAT, cMask ) + Set( _SET_DATEFORMAT, cMask ) dDate := CToD( cDate ) - OutStd( hb_eol(), cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) ) - OutStd( hb_eol(), "" ) - OutStd( hb_eol(), "49/02/04", cMask, CToD( "49/02/04" ) ) + ? cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) + ? + ? "49/02/04", cMask, CToD( "49/02/04" ) - TestCentury( hb_eol() ) + TestCentury() - OutStd( hb_eol(), "" ) + ? cMask := "yyyy/dd/mm" - SET( _SET_DATEFORMAT, cMask ) + Set( _SET_DATEFORMAT, cMask ) dDate := CToD( cDate ) - OutStd( hb_eol(), cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) ) - OutStd( hb_eol(), "" ) - OutStd( hb_eol(), "49/02/04", cMask, CToD( "49/02/04" ) ) + ? cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) + ? + ? "49/02/04", cMask, CToD( "49/02/04" ) - OutStd( hb_eol(), "" ) + ? cMask := "ddd/mmm/yy" - SET( _SET_DATEFORMAT, cMask ) + Set( _SET_DATEFORMAT, cMask ) dDate := CToD( cDate ) - OutStd( hb_eol(), cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) ) + ? cDate, cMask, dDate, DToS( dDate ), DToC( dDate ) RETURN PROCEDURE TestCentury() - OutStd( hb_eol(), "" ) - OutStd( hb_eol(), __SetCentury() ) + ? + ? __SetCentury() __SetCentury( "ON" ) - OutStd( __SetCentury() ) + ?? __SetCentury() __SetCentury( "OFF" ) - OutStd( __SetCentury() ) + ?? __SetCentury() __SetCentury( "GIBBERISH" ) - OutStd( __SetCentury() ) + ?? __SetCentury() __SetCentury( .T. ) - OutStd( __SetCentury() ) + ?? __SetCentury() __SetCentury( 5 ) - OutStd( __SetCentury() ) + ?? __SetCentury() RETURN diff --git a/harbour/tests/dates2.prg b/harbour/tests/dates2.prg index 34a3712b6b..03e7d6da15 100644 --- a/harbour/tests/dates2.prg +++ b/harbour/tests/dates2.prg @@ -8,36 +8,36 @@ PROCEDURE Main() LOCAL dDate := hb_SToD( "19990430" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) - SET( _SET_DATEFORMAT, "yyy/mm/ddd" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate + Set( _SET_DATEFORMAT, "yyy/mm/ddd" ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "on" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "off" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) - SET( _SET_DATEFORMAT, "yyy/m/d/yyy" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate + Set( _SET_DATEFORMAT, "yyy/m/d/yyy" ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "on" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "off" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) - SET( _SET_DATEFORMAT, "m/d/y/m/d" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate + Set( _SET_DATEFORMAT, "m/d/y/m/d" ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "on" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "off" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) - SET( _SET_DATEFORMAT, "mmmm/ddddd" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate + Set( _SET_DATEFORMAT, "mmmm/ddddd" ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "on" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "off" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) - SET( _SET_DATEFORMAT, "mmmmm/dd" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate + Set( _SET_DATEFORMAT, "mmmmm/dd" ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "on" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate __SetCentury( "off" ) - OutStd( Set( _SET_DATEFORMAT ), dDate, hb_eol() ) + ? Set( _SET_DATEFORMAT ), dDate RETURN diff --git a/harbour/tests/dates3.prg b/harbour/tests/dates3.prg index 43ef30c4f2..f5bd1465d3 100644 --- a/harbour/tests/dates3.prg +++ b/harbour/tests/dates3.prg @@ -10,39 +10,39 @@ PROCEDURE Main() LOCAL dDate, i - SET( _SET_DATEFORMAT, "dd/mm/yyyy" ) + Set( _SET_DATEFORMAT, "dd/mm/yyyy" ) dDate := hb_SToD( "19990525" ) - OutStd( dDate, DOW( dDate ), hb_eol() ) + ? dDate, DOW( dDate ) - OutStd( LastMonday( dDate ), hb_eol() ) + ? LastMonday( dDate ) dDate += 3 - OutStd( dDate, DOW( dDate ), hb_eol() ) + ? dDate, DOW( dDate ) dDate += 4 - OutStd( dDate, DOW( dDate ), hb_eol() ) + ? dDate, DOW( dDate ) - SET( _SET_DATEFORMAT, "mm/dd/yyyy" ) + Set( _SET_DATEFORMAT, "mm/dd/yyyy" ) dDate := hb_SToD( "19990525" ) - OutStd( dDate, DOW( dDate ), hb_eol() ) + ? dDate, DOW( dDate ) - OutStd( LastMonday( dDate ), hb_eol() ) + ? LastMonday( dDate ) dDate += 3 - OutStd( dDate, DOW( dDate ), hb_eol() ) + ? dDate, DOW( dDate ) dDate += 4 - OutStd( dDate, DOW( dDate ), hb_eol() ) + ? dDate, DOW( dDate ) - OutStd( hb_eol() ) + ? dDate := Date () FOR i := 1 TO 7 - OutStd( dDate, DOW( dDate ), hb_eol() ) + ? dDate, DOW( dDate ) dDate++ NEXT - OutStd( CToD( "" ), DOW( CToD( "" ) ), hb_eol() ) + ? CToD( "" ), DOW( CToD( "" ) ) RETURN diff --git a/harbour/tests/debugtst.prg b/harbour/tests/debugtst.prg index c5e4751f8a..b90139fe27 100644 --- a/harbour/tests/debugtst.prg +++ b/harbour/tests/debugtst.prg @@ -6,9 +6,6 @@ * $Doc$ * $Description$ Debug function tests. * Based on classes.prg - * $Requirement$ source\tools\stringp.prg - * source\rtl\objfunc.prg - * source\rtl\asort.prg * $End$ * * Written by Eddie Runia @@ -24,43 +21,43 @@ PROCEDURE Main() LOCAL oForm := TForm():New() LOCAL nNumber := 15 - QOut( oForm:ClassName() ) + ? oForm:ClassName() oForm:Show() - QOut() + ? - QOut( "-OBJECT additions-" ) - QOut( "What is in oForm ? " ) + ? "-OBJECT additions-" + ? "What is in oForm ? " Debug( oForm:Transfer() ) - QOut( "Does transfer exists ? ", __objHasMsg ( oForm, "Transfer" ) ) - QOut( "Is transfer DATA ? ", __objHasData ( oForm, "Transfer" ) ) - QOut( "Is transfer METHOD ? ", __objHasMethod( oForm, "Transfer" ) ) - QOut( "Does nLeft exists ? ", __objHasMsg ( oForm, "nLeft" ) ) - QOut( "Is nLeft DATA ? ", __objHasData ( oForm, "nLeft" ) ) - QOut( "Is nLeft METHOD ? ", __objHasMethod( oForm, "nLeft" ) ) - QOut( "Does unknown exists ? ", __objHasMsg ( oForm, "Unknown" ) ) - QOut( "Is unknown DATA ? ", __objHasData ( oForm, "Unknown" ) ) - QOut( "Is unknown METHOD ? ", __objHasMethod( oForm, "Unknown" ) ) + ? "Does transfer exists ? ", __objHasMsg ( oForm, "Transfer" ) + ? "Is transfer DATA ? ", __objHasData ( oForm, "Transfer" ) + ? "Is transfer METHOD ? ", __objHasMethod( oForm, "Transfer" ) + ? "Does nLeft exists ? ", __objHasMsg ( oForm, "nLeft" ) + ? "Is nLeft DATA ? ", __objHasData ( oForm, "nLeft" ) + ? "Is nLeft METHOD ? ", __objHasMethod( oForm, "nLeft" ) + ? "Does unknown exists ? ", __objHasMsg ( oForm, "Unknown" ) + ? "Is unknown DATA ? ", __objHasData ( oForm, "Unknown" ) + ? "Is unknown METHOD ? ", __objHasMethod( oForm, "Unknown" ) - QOut( "Set nLeft to 50 and nRight to 100" ) + ? "Set nLeft to 50 and nRight to 100" oForm:Transfer( { "nLeft", 50 }, { "nRight", 100 } ) Debug( oForm:Transfer() ) Pause() - QOut( "-DEBUG Functions-" ) - QOut( "-Statics-" ) + ? "-DEBUG Functions-" + ? "-Statics-" Debug( __dbgVMVarSList() ) - QOut( "-Global Stack-" ) - Debug ( __dbgVMStkGList() ) + ? "-Global Stack-" + Debug( __dbgVMStkGList() ) - QOut( "-Local Stack-" ) - Debug ( __dbgVMStkLList() ) + ? "-Local Stack-" + Debug( __dbgVMStkLList() ) - QOut( "-Parameters-" ) - Debug ( __dbgVMParLList() ) + ? "-Parameters-" + Debug( __dbgVMParLList() ) Pause() @@ -79,26 +76,26 @@ FUNCTION FuncSecond( nParam, cParam, uParam ) LOCAL xParam LOCAL xStack - QOut() - QOut( "-Second procedure-" ) - QOut() + ? + ? "-Second procedure-" + ? - QOut( "-Statics-" ) - Debug ( __dbgVMVarSList() ) - QOut() + ? "-Statics-" + Debug( __dbgVMVarSList() ) + ? - QOut( "-Global Stack- Len=", __dbgVMStkGCount() ) - Debug ( __dbgVMStkGList() ) - QOut() + ? "-Global Stack- Len=", __dbgVMStkGCount() + Debug( __dbgVMStkGList() ) + ? - QOut( "-Local Stack- Len=", __dbgVMStkLCount() ) - xStack := Debug ( __dbgVMStkLList() ) - QOut() + ? "-Local Stack- Len=", __dbgVMStkLCount() + xStack := Debug( __dbgVMStkLList() ) + ? - QOut( "-Parameters-" ) + ? "-Parameters-" xParam := Debug( __dbgVMParLList() ) IF xParam[ xStack[ 7 ] ] == "Hello" - QOut( ":-)" ) + ? ":-)" ENDIF Pause() @@ -162,7 +159,7 @@ STATIC FUNCTION Show() LOCAL Self := QSelf() - QOut( "lets show a form from here :-)" ) + ? "lets show a form from here :-)" RETURN NIL @@ -252,10 +249,13 @@ 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" ) - QOut( "TRANSFER: Incorrect argument(", n, ") ", xData ) + ? "TRANSFER: Incorrect argument(", n, ") ", xData ENDIF NEXT ENDIF RETURN xRet + +STATIC PROCEDURE Debug() + RETURN diff --git a/harbour/tests/delimtst.prg b/harbour/tests/delimtst.prg index 5250380861..aed3b5da88 100644 --- a/harbour/tests/delimtst.prg +++ b/harbour/tests/delimtst.prg @@ -29,25 +29,26 @@ PROCEDURE Main() // Try to copy 10 records, starting 5 records from EOF, using WHILE GO BOTTOM - skip -4 + SKIP -4 COPY WHILE ncount++ < 9 TO test4a DELIMITED // Copy the last 10 records. GO BOTTOM - skip -9 + SKIP -9 COPY REST TO test5 DELIMITED // Copy the last 10 records again. GO BOTTOM - skip -9 + SKIP -9 COPY TO test6 delimited WHILE ! EOF() // Copy only some of the last 10 records. GO BOTTOM - skip -9 + SKIP -9 COPY REST TO test7 DELIMITED FOR _field->married // Try to append from a file that we know does not exist. DELETE file test8.txt APPEND FROM test8 delimited - QUIT + + RETURN diff --git a/harbour/tests/devtest.prg b/harbour/tests/devtest.prg index 1b7d5e847b..a3233f43f3 100644 --- a/harbour/tests/devtest.prg +++ b/harbour/tests/devtest.prg @@ -14,13 +14,12 @@ PROCEDURE Main() #ifdef __HARBOUR__ - SET PRINTER TO devtesth #else SET PRINTER TO devtestc #endif SET DEVICE TO PRINTER - DevPos( - 2, 76 ) + DevPos( -2, 76 ) ? PRow(), PCol() DevOut( "First text written!" ) ? PRow(), PCol() @@ -30,9 +29,9 @@ PROCEDURE Main() ? PRow(), PCol() DevOut( "Off to the side!!" ) ? PRow(), PCol() - DevPos( 8, - 12 ) + DevPos( 8, -12 ) ? PRow(), PCol() - DevPos( 13, - 12 ) + DevPos( 13, -12 ) ? PRow(), PCol() DevOut( "More test text!" ) ? PRow(), PCol() @@ -44,4 +43,5 @@ PROCEDURE Main() ? PRow(), PCol() DevOut( "!" ) ? PRow(), PCol() - QUIT + + RETURN diff --git a/harbour/tests/dirtest.prg b/harbour/tests/dirtest.prg index 247315a541..d983feaed9 100644 --- a/harbour/tests/dirtest.prg +++ b/harbour/tests/dirtest.prg @@ -15,18 +15,17 @@ PROCEDURE Main( filespec, attribs, cshort ) lShort := .T. ENDIF - // aDir := ASort( Directory( filespec, attribs, lShort ),,, {| x, y | Upper( x[ F_NAME ] ) < Upper( y[ F_NAME ] ) } ) +// 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, F_NAME ], 20 ), "|", ; - Transform( aDir[ x, F_SIZE ], "9,999,999,999" ), "|", ; - aDir[ x, F_DATE ], "|", ; - aDir[ x, F_TIME ], "|", ; - aDir[ x, F_ATTR ] ) + ? 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/disptest.prg b/harbour/tests/disptest.prg index 1d2a2a0dcd..a236c9b942 100644 --- a/harbour/tests/disptest.prg +++ b/harbour/tests/disptest.prg @@ -16,7 +16,7 @@ PROCEDURE Main() LOCAL a, b, c, d, e, f, g, h, i, j, k, l - SetPos( - 2, 76 ) + SetPos( -2, 76 ) DispOut( "You won't see this!" ) Tone( 440, 1 ) Inkey( 0 ) @@ -61,7 +61,7 @@ PROCEDURE Main() SetPos( 6, 74 ) DispOut( "Partly off screen!" ) ? Row(), Col() - SetPos( 8, - 12 ) + SetPos( 8, -12 ) a := Row() b := Col() ?? "PA" @@ -73,7 +73,7 @@ PROCEDURE Main() ? a, b ? c, d ? e, f - SetPos( 13, - 12 ) + SetPos( 13, -12 ) a := Row() b := Col() DispOut( "All off screen!" ) @@ -91,4 +91,5 @@ PROCEDURE Main() Inkey( 0 ) SetPos( 50, 20 ) ?? "On screen??" - QUIT + + RETURN diff --git a/harbour/tests/docase.prg b/harbour/tests/docase.prg index 8699246ea6..8e3a20d053 100644 --- a/harbour/tests/docase.prg +++ b/harbour/tests/docase.prg @@ -8,26 +8,26 @@ PROCEDURE Main() LOCAL n := 2 - QOut( "testing Harbour Do case" ) + ? "testing Harbour DO CASE" DO CASE CASE n == 1 - QOut( "n is 1" ) - QOut( "first case" ) + ? "n is 1" + ? "first case" CASE n == 2 - QOut( "n is 2" ) - QOut( "second case" ) + ? "n is 2" + ? "second case" CASE n == 3 - QOut( "n is 3" ) - QOut( "third case" ) + ? "n is 3" + ? "third case" - OTHERWISE - QOut( "Sorry, I don't know what n is :-)" ) - QOut( "otherwise" ) + OTHERWISE + ? "Sorry, I don't know what n is :-)" + ? "otherwise" ENDCASE - QOut( "Ok!" ) + ? "Ok!" RETURN diff --git a/harbour/tests/dosshell.prg b/harbour/tests/dosshell.prg index 0130337f8f..06f5b492d3 100644 --- a/harbour/tests/dosshell.prg +++ b/harbour/tests/dosshell.prg @@ -8,8 +8,6 @@ // // This program shell to DOS // -// Warning : DOS only -// // Written by Eddie Runia // www - http://harbour-project.org // @@ -18,16 +16,16 @@ PROCEDURE Main() - LOCAL cOs := Upper( OS() ) - LOCAL cShell := GetEnv( "COMSPEC" ) + LOCAL cShell - IF At( "WINDOWS", cOs ) != 0 .OR. At( "DOS", cOs ) != 0 ; - .OR. At( "OS/2", cOs ) != 0 - ? "About to shell to DOS.." - ! ( cShell ) - ? "Hey, I am back !" - ELSE - ? "Sorry this program is for Windows, DOS, and OS/2 only" - ENDIF + #if defined( __PLATFORM__UNIX ) + cShell := GetEnv( "SHELL" ) + #else + cShell := GetEnv( "COMSPEC" ) + #endif + + ? "About to shell to OS.." + ! ( cShell ) + ? "Hey, I am back !" RETURN diff --git a/harbour/tests/dttest.prg b/harbour/tests/dttest.prg index 6a2af9bfb9..2794605cd8 100644 --- a/harbour/tests/dttest.prg +++ b/harbour/tests/dttest.prg @@ -14,35 +14,35 @@ PROCEDURE Main() - ? HB_DATETIME( 1974 ) + ? hb_DateTime( 1974 ) - ? " VALTYPE( HB_DATETIME() ) =>", VALTYPE( HB_DATETIME() ) - ? " YEAR( HB_DATETIME() ) =>", YEAR( HB_DATETIME() ) - ? " MONTH( HB_DATETIME() ) =>", MONTH( HB_DATETIME() ) - ? " DAY( HB_DATETIME() ) =>", DAY( HB_DATETIME() ) + ? " ValType( hb_DateTime() ) =>", ValType( hb_DateTime() ) + ? " Year( hb_DateTime() ) =>", Year( hb_DateTime() ) + ? " Month( hb_DateTime() ) =>", Month( hb_DateTime() ) + ? " Day( hb_DateTime() ) =>", Day( hb_DateTime() ) ? - ? " VALTYPE( HB_DATETIME( 1974, 5, 31 ) ) =>", VALTYPE( HB_DATETIME( 1974, 5, 31 ) ) - ? " YEAR( HB_DATETIME( 1974, 5, 31 ) ) =>", YEAR( HB_DATETIME( 1974, 5, 31 ) ) - ? " MONTH( HB_DATETIME( 1974, 5, 31 ) ) =>", MONTH( HB_DATETIME( 1974, 5, 31 ) ) - ? " DAY( HB_DATETIME( 1974, 5, 31 ) ) =>", DAY( HB_DATETIME( 1974, 5, 31 ) ) - ? " DTOC( HB_DATETIME( 1974, 5, 31 ) ) =>", DTOC( HB_DATETIME( 1974, 5, 31 ) ) + ? " ValType( hb_DateTime( 1974, 5, 31 ) ) =>", ValType( hb_DateTime( 1974, 5, 31 ) ) + ? " Year( hb_DateTime( 1974, 5, 31 ) ) =>", Year( hb_DateTime( 1974, 5, 31 ) ) + ? " Month( hb_DateTime( 1974, 5, 31 ) ) =>", Month( hb_DateTime( 1974, 5, 31 ) ) + ? " Day( hb_DateTime( 1974, 5, 31 ) ) =>", Day( hb_DateTime( 1974, 5, 31 ) ) + ? " DToC( hb_DateTime( 1974, 5, 31 ) ) =>", DToC( hb_DateTime( 1974, 5, 31 ) ) ? - ? " VALTYPE( HB_DATETIME( 1974, 31, 5, NIL, NIL, NIL ) ) =>", VALTYPE( HB_DATETIME( 1974, 31, 5, NIL, NIL, NIL ) ) + ? " ValType( hb_DateTime( 1974, 31, 5, NIL, NIL, NIL ) ) =>", ValType( hb_DateTime( 1974, 31, 5, NIL, NIL, NIL ) ) ? - ? " VALTYPE( HB_DATETIME( 2001, 10, 13, 18, 42, 16 ) ) =>", VALTYPE( HB_DATETIME( 2001, 10, 13, 18, 42, 16 ) ) + ? " ValType( hb_DateTime( 2001, 10, 13, 18, 42, 16 ) ) =>", ValType( hb_DateTime( 2001, 10, 13, 18, 42, 16 ) ) ? - ? " VALTYPE( HB_DATETIME( NIL, NIL, NIL, 10, 36, 05 ) ) =>", VALTYPE( HB_DATETIME( NIL, NIL, NIL, 10, 36, 05 ) ) - ? " HB_DATETIME( NIL, NIL, NIL, 10, 36, 05 ) =>", HB_DATETIME( NIL, NIL, NIL, 10, 36, 05 ) + ? " ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 05 ) ) =>", ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 05 ) ) + ? " hb_DateTime( NIL, NIL, NIL, 10, 36, 05 ) =>", hb_DateTime( NIL, NIL, NIL, 10, 36, 05 ) ? - ? " VALTYPE( HB_DATETIME( NIL, NIL, NIL, 10, 36, 05, 176 ) ) =>", VALTYPE( HB_DATETIME( NIL, NIL, NIL, 10, 36, 05, 176 ) ) - ? " HB_DATETIME( NIL, NIL, NIL, 10, 36, 05, 176 ) =>", HB_DATETIME( NIL, NIL, NIL, 10, 36, 05, 176 ) + ? " ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 05, 176 ) ) =>", ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 05, 176 ) ) + ? " hb_DateTime( NIL, NIL, NIL, 10, 36, 05, 176 ) =>", hb_DateTime( NIL, NIL, NIL, 10, 36, 05, 176 ) - ? " VALTYPE( HB_DATETIME( 0, 0, 0, 10, 36, 05, 176 ) ) =>", VALTYPE( HB_DATETIME( 0, 0, 0, 10, 36, 05, 176 ) ) - ? " HB_DATETIME( 0, 0, 0, 10, 36, 05, 176 ) =>", HB_DATETIME( 0, 0, 0, 10, 36, 05, 176 ) + ? " ValType( hb_DateTime( 0, 0, 0, 10, 36, 05, 176 ) ) =>", ValType( hb_DateTime( 0, 0, 0, 10, 36, 05, 176 ) ) + ? " hb_DateTime( 0, 0, 0, 10, 36, 05, 176 ) =>", hb_DateTime( 0, 0, 0, 10, 36, 05, 176 ) RETURN diff --git a/harbour/tests/dupvars.prg b/harbour/tests/dupvars.prg index d7735044d3..5e23089183 100644 --- a/harbour/tests/dupvars.prg +++ b/harbour/tests/dupvars.prg @@ -9,6 +9,6 @@ PROCEDURE Main() LOCAL a, a - QOut( "ok" ) + ? "ok" RETURN diff --git a/harbour/tests/dynobj.prg b/harbour/tests/dynobj.prg index d6a41cd3e1..17331c6e61 100644 --- a/harbour/tests/dynobj.prg +++ b/harbour/tests/dynobj.prg @@ -17,91 +17,91 @@ PROCEDURE Main() LOCAL oForm := TForm():New() - QOut( "What methods are in the class :" ) + ? "What methods are in the class :" Debug( __objGetMethodList( oForm ) ) /* Let's add an inline at run-time. Should already be possible */ - QOut( "Let's add inline 'CalcArea' at run-time to an already instanced class" ) + ? "Let's add inline 'CalcArea' at run-time to an already instanced class" __objAddInline( oForm, "CalcArea", ; {| self | ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) } ) - QOut( "What methods are in the class :" ) + ? "What methods are in the class :" Debug( __objGetMethodList( oForm ) ) - QOut( "What is the Form area ?" ) - QOut( oForm:CalcArea() ) + ? "What is the Form area ?" + ? oForm:CalcArea() - QOut( "Let's add method 'Smile' at run-time to an already instanced class" ) + ? "Let's add method 'Smile' at run-time to an already instanced class" __objAddMethod( oForm, "Smile", @Smile() ) - QOut( "What methods are in the class :" ) + ? "What methods are in the class :" Debug( __objGetMethodList( oForm ) ) - QOut( "Smile please " ) + ? "Smile please " oForm:Smile() Pause() - QOut( "Data items before" ) + ? "Data items before" Debug( oForm ) - QOut( "Let's add an additional data item" ) + ? "Let's add an additional data item" __objAddData( oForm, "cHelp" ) oForm:cHelp := "This is a real tricky test" - QOut( "Data items after" ) + ? "Data items after" Debug( oForm ) Pause() - QOut( "Let's attach a bigger smile" ) + ? "Let's attach a bigger smile" __objModMethod( oForm, "Smile", @BigSmile() ) - QOut( "Let's smile" ) + ? "Let's smile" oForm:Smile() - QOut( "And CalcArea() will now give a result in square inches" ) + ? "And CalcArea() will now give a result in square inches" __objModInline( oForm, "CalcArea", ; {| self | ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) / ( 2.54 * 2.54 ) } ) - QOut( "What is the Form area ?" ) - QOut( oForm:CalcArea() ) + ? "What is the Form area ?" + ? oForm:CalcArea() - QOut( "What methods are in the class :" ) + ? "What methods are in the class :" Debug( __objGetMethodList( oForm ) ) - QOut( "Delete CalcArea" ) + ? "Delete CalcArea" __objDelInline( oForm, "CalcArea" ) - QOut( "What methods are in the class :" ) + ? "What methods are in the class :" Debug( __objGetMethodList( oForm ) ) - QOut( "Delete Smile" ) + ? "Delete Smile" __objDelMethod( oForm, "Smile" ) - QOut( "What methods are in the class :" ) + ? "What methods are in the class :" Debug( __objGetMethodList( oForm ) ) Pause() - QOut( "Data items before" ) + ? "Data items before" Debug( oForm ) - QOut( "Let's delete cHelp" ) + ? "Let's delete cHelp" __objDelData( oForm, "cHelp" ) - QOut( "Data items after" ) + ? "Data items after" Debug( oForm ) -/* oForm:cHelp := "Please crash" */ +/* oForm:cHelp := "Please crash" */ RETURN @@ -142,9 +142,9 @@ STATIC FUNCTION Smile() LOCAL self := QSelf() IF ::CalcArea() == 300 - QOut( ":-)" ) + ? ":-)" ELSE - QOut( ":-(" ) + ? ":-(" ENDIF RETURN self @@ -153,7 +153,7 @@ STATIC FUNCTION BigSmile() LOCAL self := QSelf() - QOut( ":-)))" ) + ? ":-)))" RETURN self @@ -162,3 +162,6 @@ FUNCTION Pause() __Accept( "Pause :" ) RETURN NIL + +STATIC PROCEDURE Debug() + RETURN diff --git a/harbour/tests/dynsym.prg b/harbour/tests/dynsym.prg index ae3d26a381..361b49e594 100644 --- a/harbour/tests/dynsym.prg +++ b/harbour/tests/dynsym.prg @@ -7,7 +7,7 @@ PROCEDURE Main() LOCAL nPos FOR nPos := 1 TO nCount - OutStd( __dynsGetName( nPos ), Chr(13) + Chr(10) ) + ? __dynsGetName( nPos ) NEXT nPos := __dynsGetIndex( "MAIN" ) diff --git a/harbour/tests/exittest.prg b/harbour/tests/exittest.prg index 8343c75268..f91f2ef992 100644 --- a/harbour/tests/exittest.prg +++ b/harbour/tests/exittest.prg @@ -15,7 +15,7 @@ PROCEDURE Main() ENDIF ENDDO - QOut( "do exit test", iif( x == 5, "passed", "fail" ) ) + ? "do exit test", iif( x == 5, "passed", "fail" ) FOR x := 1 TO 10 IF x == 5 @@ -23,6 +23,6 @@ PROCEDURE Main() ENDIF NEXT - QOut( "for exit test", iif( x == 5, "passed", "fail" ) ) + ? "for exit test", iif( x == 5, "passed", "fail" ) RETURN diff --git a/harbour/tests/extend1.prg b/harbour/tests/extend1.prg index 7657cd9c4b..43c177802c 100644 --- a/harbour/tests/extend1.prg +++ b/harbour/tests/extend1.prg @@ -12,271 +12,271 @@ PROCEDURE Main() SET CENTURY ON - QOut( "Testing Harbour Extended system:" ) - QOut( "================================" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) + ? "Testing Harbour Extended system:" + ? "================================" + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? __Accept( "Press return to continue..." ) - QOut( "Strings:" ) - QOut( "========" ) - QOut( "" ) - QOut( ' _parc() and _retc() with Strings1( "Hello" ) =>', Strings1( "Hello" ) ) - QOut( ' _parc() and _retc() with Strings2( { "Hello" } ) =>', Strings2( { "Hello" } ) ) - QOut( ' _retclen() with Strings3( "Hello word", 5 ) =>', Strings3( "Hello", 5 ) ) - QOut( ' _parclen() with Strings4( "Hello word" ) => ', Strings4( "Hello word" ) ) + ? "Strings:" + ? "========" + ? + ? ' _parc() and _retc() with Strings1( "Hello" ) =>', Strings1( "Hello" ) + ? ' _parc() and _retc() with Strings2( { "Hello" } ) =>', Strings2( { "Hello" } ) + ? ' _retclen() with Strings3( "Hello word", 5 ) =>', Strings3( "Hello", 5 ) + ? ' _parclen() with Strings4( "Hello word" ) => ', Strings4( "Hello word" ) uVar := "Hello word" - QOut( ' uVar := "Hello word"' ) + ? ' uVar := "Hello word"' Strings5( @uVar, "Harbour power!!!" ) - QOut( ' _storc() with Strings5( @uVar, "Harbour power!!!" ) => ', uVar ) + ? ' _storc() with Strings5( @uVar, "Harbour power!!!" ) => ', uVar Strings6( @uVar, "Harbour power!!!", 7 ) - QOut( ' _storclen() with Strings6( @uVar, "Harbour power!!!", 7 ) => ', uVar ) + ? ' _storclen() with Strings6( @uVar, "Harbour power!!!", 7 ) => ', uVar uVar := { "Hello word" } - QOut( ' uVar := { "Hello word" }' ) + ? ' uVar := { "Hello word" }' Strings7( uVar, "Harbour power!!!" ) - QOut( ' _storc() with Strings7( uVar, "Harbour power!!!" ) => ', uVar[ 1 ] ) + ? ' _storc() with Strings7( uVar, "Harbour power!!!" ) => ', uVar[ 1 ] Strings8( uVar, "Harbour power!!!", 7 ) - QOut( ' _storclen() with Strings8( uVar, "Harbour power!!!", 7 ) => ', uVar[ 1 ] ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) + ? ' _storclen() with Strings8( uVar, "Harbour power!!!", 7 ) => ', uVar[ 1 ] + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? __Accept( "Press return to continue..." ) - QOut( "Logicals:" ) - QOut( "=========" ) - QOut( "" ) - QOut( ' _parl() and _retl() with Logical1( .T. ) =>', Logical1( .T. ) ) - QOut( ' _parl() and _parl() with Logical2( { .T. } ) =>', Logical2( { .T. } ) ) + ? "Logicals:" + ? "=========" + ? + ? ' _parl() and _retl() with Logical1( .T. ) =>', Logical1( .T. ) + ? ' _parl() and _parl() with Logical2( { .T. } ) =>', Logical2( { .T. } ) uVar := .T. - QOut( ' uVar := .T.' ) + ? ' uVar := .T.' Logical3( @uVar, .F. ) - QOut( ' _storl() with Logical3( @uVar, .F. ) => ', uVar ) + ? ' _storl() with Logical3( @uVar, .F. ) => ', uVar uVar := { .T. } - QOut( ' uVar := { .T. }' ) + ? ' uVar := { .T. }' Logical4( uVar, .F. ) - QOut( ' _storl() with Logical4( uVar, .F. ) => ', uVar[ 1 ] ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) + ? ' _storl() with Logical4( uVar, .F. ) => ', uVar[ 1 ] + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? __Accept( "Press return to continue..." ) - QOut( "Dates: (SET CENTURY ON)" ) - QOut( "=======================" ) - QOut( "" ) - QOut( ' _pards() and _retds() with Date1( CToD( "01/01/2000" ) ) =>', Date1( CToD( "01/01/2000" ) ) ) - QOut( ' _pards() and retds() with Date2( { CToD( "01/01/2000" ) } ) =>', Date2( { CToD( "01/01/2000" ) } ) ) + ? "Dates: (SET CENTURY ON)" + ? "=======================" + ? + ? ' _pards() and _retds() with Date1( CToD( "01/01/2000" ) ) =>', Date1( CToD( "01/01/2000" ) ) + ? ' _pards() and retds() with Date2( { CToD( "01/01/2000" ) } ) =>', Date2( { CToD( "01/01/2000" ) } ) uVar := CToD( "01/01/2000" ) - QOut( ' uVar := CToD( "01/01/2000" )' ) + ? ' uVar := CToD( "01/01/2000" )' Date3( @uVar, CToD( "12/31/1999" ) ) - QOut( ' _stords() with Date3( @uVar, CToD( "12/31/1999" ) ) => ', uVar ) + ? ' _stords() with Date3( @uVar, CToD( "12/31/1999" ) ) => ', uVar uVar := { CToD( "01/01/2000" ) } - QOut( ' uVar := { CToD( "01/01/2000" ) }' ) + ? ' uVar := { CToD( "01/01/2000" ) }' Date4( uVar, CToD( "12/31/1999" ) ) - QOut( ' _stords() with Date4( uVar, CToD( "12/31/1999" ) ) => ', uVar[ 1 ] ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) + ? ' _stords() with Date4( uVar, CToD( "12/31/1999" ) ) => ', uVar[ 1 ] + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? __Accept( "Press return to continue..." ) - QOut( "Numbers:" ) - QOut( "========" ) - QOut( "" ) - QOut( ' _parni() and _retni() with Int1( 1 ) =>', Int1( 1 ) ) - QOut( ' _parni() and _retni() with Int2( { 1 } ) =>', Int2( { 1 } ) ) - QOut( ' _parnl() and _retnl() with Long1( 123456789 ) =>', Long1( 123456789 ) ) - QOut( ' _parnl() and _retnl() with Long2( { 123456789 } ) =>', Long2( { 123456789 } ) ) - QOut( ' _parnd() and _retnd() with Double1( 1234567.89 ) =>', Double1( 1234567.89 ) ) - QOut( ' _parnd() and _retnd() with Double2( { 1234567.89 } ) =>', Double2( { 1234567.89 } ) ) + ? "Numbers:" + ? "========" + ? + ? ' _parni() and _retni() with Int1( 1 ) =>', Int1( 1 ) + ? ' _parni() and _retni() with Int2( { 1 } ) =>', Int2( { 1 } ) + ? ' _parnl() and _retnl() with Long1( 123456789 ) =>', Long1( 123456789 ) + ? ' _parnl() and _retnl() with Long2( { 123456789 } ) =>', Long2( { 123456789 } ) + ? ' _parnd() and _retnd() with Double1( 1234567.89 ) =>', Double1( 1234567.89 ) + ? ' _parnd() and _retnd() with Double2( { 1234567.89 } ) =>', Double2( { 1234567.89 } ) uVar := 100 - QOut( ' uVar := 100' ) + ? ' uVar := 100' Int3( @uVar, 200 ) - QOut( ' _storni() with Int3( @uVar, 200 ) => ', uVar ) + ? ' _storni() with Int3( @uVar, 200 ) => ', uVar uVar := { 100 } - QOut( ' uVar := { 100 }' ) + ? ' uVar := { 100 }' Int4( uVar, 200 ) - QOut( ' _storni() with Int4( uVar, 200 ) => ', uVar[ 1 ] ) + ? ' _storni() with Int4( uVar, 200 ) => ', uVar[ 1 ] uVar := 123456789 - QOut( ' uVar := 123456789' ) + ? ' uVar := 123456789' Long3( @uVar, 987654321 ) - QOut( ' _stornl() with Long3( @uVar, 987654321 ) => ', uVar ) + ? ' _stornl() with Long3( @uVar, 987654321 ) => ', uVar uVar := { 123456789 } - QOut( ' uVar := { 123456789 }' ) + ? ' uVar := { 123456789 }' Long4( uVar, 987654321 ) - QOut( ' _stornl() with Long4( uVar, 987654321 ) => ', uVar[ 1 ] ) + ? ' _stornl() with Long4( uVar, 987654321 ) => ', uVar[ 1 ] uVar := 1234567.89 - QOut( ' uVar := 1234567.89' ) + ? ' uVar := 1234567.89' Double3( @uVar, 9876543.21 ) - QOut( ' _stornd() with Double3( @uVar, 9876543.21 ) => ', uVar ) + ? ' _stornd() with Double3( @uVar, 9876543.21 ) => ', uVar uVar := { 1234567.89 } - QOut( ' uVar := { 1234567.89 }' ) + ? ' uVar := { 1234567.89 }' Double4( uVar, 9876543.21 ) - QOut( ' _stornl() with Double4( uVar, 9876543.21 ) => ', uVar[ 1 ] ) - QOut( "" ) - QOut( "" ) - QOut( "" ) + ? ' _stornl() with Double4( uVar, 9876543.21 ) => ', uVar[ 1 ] + ? + ? + ? __Accept( "Press return to continue..." ) - QOut( "Nil:" ) - QOut( "====" ) - QOut( "" ) - QOut( ' _ret() with Nil1() =>', Nil1() ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) + ? "Nil:" + ? "====" + ? + ? ' _ret() with Nil1() =>', Nil1() + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? __Accept( "Press return to continue..." ) - QOut( "Arrays:" ) - QOut( "=======" ) - QOut( "" ) - QOut( ' _reta() with Len( Arrays1( 100 ) ) =>', Len( Arrays1( 100 ) ) ) - QOut( ' _parinfa() with Arrays2( { 1, "a", .T. }, 0 ) =>', Arrays2( { 1, "a", .T. }, 0 ) ) - QOut( ' _parinfa() with Arrays2( { 1, "a", .T. }, 2 ) =>', Arrays2( { 1, "a", .T. }, 2 ), "( IT_STRING )" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) + ? "Arrays:" + ? "=======" + ? + ? ' _reta() with Len( Arrays1( 100 ) ) =>', Len( Arrays1( 100 ) ) + ? ' _parinfa() with Arrays2( { 1, "a", .T. }, 0 ) =>', Arrays2( { 1, "a", .T. }, 0 ) + ? ' _parinfa() with Arrays2( { 1, "a", .T. }, 2 ) =>', Arrays2( { 1, "a", .T. }, 2 ), "( IT_STRING )" + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? __Accept( "Press return to continue..." ) - QOut( "Parameters info:" ) - QOut( "================" ) - QOut( "" ) - QOut( ' _pcount() with Params1( 1, "a", .T., 10 ) =>', Params1( 1, "a", .T. , 10 ) ) - QOut( ' _parinfo() with Params2( 1, "a", .T., 0 ) =>', Params2( 1, "a", .T. , 0 ) ) - QOut( ' _parinfo() with Params2( 1, "a", .T., 3 ) =>', Params2( 1, "a", .T. , 3 ), "( IT_LOGICAL )" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) + ? "Parameters info:" + ? "================" + ? + ? ' _pcount() with Params1( 1, "a", .T., 10 ) =>', Params1( 1, "a", .T. , 10 ) + ? ' _parinfo() with Params2( 1, "a", .T., 0 ) =>', Params2( 1, "a", .T. , 0 ) + ? ' _parinfo() with Params2( 1, "a", .T., 3 ) =>', Params2( 1, "a", .T. , 3 ), "( IT_LOGICAL )" + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? __Accept( "Press return to continue..." ) - QOut( "Undocumented features:" ) - QOut( "======================" ) - QOut( "" ) - QOut( ' _parc( -1, ...) with Undoc2() =>', Undoc2() ) - QOut( ' _parclen( -1, ...) with Undoc3() =>', Undoc3() ) - QOut( ' _pards( -1, ...) with Undoc4( CToD( "01/01/2000" ) ) =>', Undoc4( CToD( "01/01/2000" ) ) ) - QOut( ' _parl( -1, ...) with Undoc5( .T. ) =>', Undoc5( .T. ) ) - QOut( ' _parnd( -1, ...) with Undoc6( 1234567.89 ) =>', Undoc6( 1234567.89 ) ) - QOut( ' _parni( -1, ...) with Undoc7( 1234 ) =>', Undoc7( 1234 ) ) - QOut( ' _parnl( -1, ...) with Undoc8( 123456789 ) =>', Undoc8( 123456789 ) ) - QOut( ' _parinfa( -1, ...) with Undoc9( 10 ) =>', Undoc9( 10 ) ) - QOut( ' _parinfo( -1 ) with Undoc10() =>', Undoc10(), "( IT_STRING )" ) - QOut( ' _storc( szText, -1, ... ) with Undoc11( "Hello word" ) =>', Undoc11( "Hello word" ) ) - QOut( ' _storclen( szText, -1, ... ) with Undoc12( "Hello word", 7 ) =>', Undoc12( "Hello word", 7 ) ) - QOut( ' _stords( szDate, -1, ... ) with Undoc13( CToD( "01/01/2000" ) ) =>', Undoc13( CToD( "01/01/2000" ) ) ) - QOut( ' _storl( iLogical, -1 ) with Undoc14( .T. ) =>', Undoc14( .T. ) ) - QOut( ' _storni( iValue, -1 ) with Undoc15( 1234 ) =>', Undoc15( 1234 ) ) - QOut( ' _stornl( lValue, -1 ) with Undoc16( 123456789 ) =>', Undoc16( 123456789 ) ) - QOut( ' _stornd( dValue, -1 ) with Undoc17( 1234567.89 ) =>', Undoc17( 1234567.89 ) ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) - QOut( "" ) + ? "Undocumented features:" + ? "======================" + ? + ? ' _parc( -1, ...) with Undoc2() =>', Undoc2() + ? ' _parclen( -1, ...) with Undoc3() =>', Undoc3() + ? ' _pards( -1, ...) with Undoc4( CToD( "01/01/2000" ) ) =>', Undoc4( CToD( "01/01/2000" ) ) + ? ' _parl( -1, ...) with Undoc5( .T. ) =>', Undoc5( .T. ) + ? ' _parnd( -1, ...) with Undoc6( 1234567.89 ) =>', Undoc6( 1234567.89 ) + ? ' _parni( -1, ...) with Undoc7( 1234 ) =>', Undoc7( 1234 ) + ? ' _parnl( -1, ...) with Undoc8( 123456789 ) =>', Undoc8( 123456789 ) + ? ' _parinfa( -1, ...) with Undoc9( 10 ) =>', Undoc9( 10 ) + ? ' _parinfo( -1 ) with Undoc10() =>', Undoc10(), "( IT_STRING )" + ? ' _storc( szText, -1, ... ) with Undoc11( "Hello word" ) =>', Undoc11( "Hello word" ) + ? ' _storclen( szText, -1, ... ) with Undoc12( "Hello word", 7 ) =>', Undoc12( "Hello word", 7 ) + ? ' _stords( szDate, -1, ... ) with Undoc13( CToD( "01/01/2000" ) ) =>', Undoc13( CToD( "01/01/2000" ) ) + ? ' _storl( iLogical, -1 ) with Undoc14( .T. ) =>', Undoc14( .T. ) + ? ' _storni( iValue, -1 ) with Undoc15( 1234 ) =>', Undoc15( 1234 ) + ? ' _stornl( lValue, -1 ) with Undoc16( 123456789 ) =>', Undoc16( 123456789 ) + ? ' _stornd( dValue, -1 ) with Undoc17( 1234567.89 ) =>', Undoc17( 1234567.89 ) + ? + ? + ? + ? + ? RETURN diff --git a/harbour/tests/fib.prg b/harbour/tests/fib.prg index 234705323a..0a998e97ef 100644 --- a/harbour/tests/fib.prg +++ b/harbour/tests/fib.prg @@ -7,8 +7,8 @@ PROCEDURE Main() LOCAL n FOR n := 1 TO 20 - QOut( FibR( n ) ) - QOut( FibI( n ) ) + ? FibR( n ) + ? FibI( n ) NEXT RETURN diff --git a/harbour/tests/fornext.prg b/harbour/tests/fornext.prg index bc014ca367..404509c65f 100644 --- a/harbour/tests/fornext.prg +++ b/harbour/tests/fornext.prg @@ -14,30 +14,30 @@ PROCEDURE Main() LOCAL n - QOut( "Testing Harbour For Next loops. Going up quick" ) + ? "Testing Harbour For Next loops. Going up quick" FOR n := 1 TO 10 STEP 4 - QOut( n ) - NEXT n + ? n + NEXT - QOut( "Going down" ) + ? "Going down" FOR n := 10 TO 1 STEP -1 - QOut( n ) - NEXT n + ? n + NEXT - QOut( "No step" ) + ? "No step" FOR n := 1 TO 10 - QOut( n ) - NEXT n + ? n + NEXT - QOut( "No production" ) + ? "No production" FOR n := 1 TO 10 STEP -1 - QOut( n ) - NEXT n + ? n + NEXT - QOut( "Ok!" ) + ? "Ok!" RETURN diff --git a/harbour/tests/fortest.prg b/harbour/tests/fortest.prg index d577461524..c63c2ea755 100644 --- a/harbour/tests/fortest.prg +++ b/harbour/tests/fortest.prg @@ -9,10 +9,6 @@ // TODO: add test for "step 0" -#ifndef __HARBOUR__ - #xtranslate hb_eol() => ( Chr( 13 ) + Chr( 10 ) ) -#endif - STATIC snFrom STATIC snTo STATIC snStep @@ -22,7 +18,7 @@ PROCEDURE Main() LOCAL array LOCAL tmp, n - QOut( "Testing Harbour For Next loops." ) + ? "Testing Harbour For Next loops." array := { ; { 1, 10, 1 }, ; @@ -40,14 +36,13 @@ PROCEDURE Main() snTo := array[ tmp ][ 2 ] snStep := array[ tmp ][ 3 ] - OutStd( " From: " ) ; OutStd( snFrom ) - OutStd( " To: " ) ; OutStd( snTo ) - OutStd( " Step: " ) ; OutStd( snStep ) - OutStd( hb_eol() ) + ? " From:", snFrom,; + " To:", snTo,; + " Step:", snStep FOR n := Eval( {|| ValFrom() } ) TO Eval( {|| ValTo() } ) STEP Eval( {|| ValStep() } ) - OutStd( "Exec " ) ; OutStd( n ) ; OutStd( hb_eol() ) - NEXT n + ? "Exec", n + NEXT NEXT @@ -55,18 +50,18 @@ PROCEDURE Main() STATIC FUNCTION ValFrom() - OutStd( "From" ) ; OutStd( hb_eol() ) + ? "From" RETURN snFrom STATIC FUNCTION ValTo() - OutStd( "To" ) ; OutStd( hb_eol() ) + ? "To" RETURN snTo STATIC FUNCTION ValStep() - OutStd( "Step" ) ; OutStd( hb_eol() ) + ? "Step" RETURN snStep diff --git a/harbour/tests/funcarr.prg b/harbour/tests/funcarr.prg index cebbe0cc54..a92b761908 100644 --- a/harbour/tests/funcarr.prg +++ b/harbour/tests/funcarr.prg @@ -15,43 +15,43 @@ PROCEDURE Main() LOCAL a - QOut( "Direct reference : ", aFunc()[ 1 ] ) + ? "Direct reference : ", aFunc()[ 1 ] a := aFunc() - QOut( "Ref via array : ", a[ 1 ] ) + ? "Ref via array : ", a[ 1 ] aFunc()[ 1 ] := "Something different" - QOut( "Assign new text : ", aFunc()[ 1 ] ) + ? "Assign new text : ", aFunc()[ 1 ] aFunc()[ 1 ] := 4 - QOut( "Assign 4 : ", aFunc()[ 1 ] ) + ? "Assign 4 : ", aFunc()[ 1 ] - QOut( "Post increment : ", aFunc()[ 1 ]++ ) - QOut( "After : ", aFunc()[ 1 ] ) - QOut( "Pre decrement : ", --aFunc()[ 1 ] ) - QOut( "After : ", aFunc()[ 1 ] ) + ? "Post increment : ", aFunc()[ 1 ]++ + ? "After : ", aFunc()[ 1 ] + ? "Pre decrement : ", --aFunc()[ 1 ] + ? "After : ", aFunc()[ 1 ] aFunc()[ 1 ] += 2 - QOut( "Plus 2 : ", aFunc()[ 1 ] ) + ? "Plus 2 : ", aFunc()[ 1 ] aFunc()[ 1 ] -= 3 - QOut( "Minus 3 : ", aFunc()[ 1 ] ) + ? "Minus 3 : ", aFunc()[ 1 ] aFunc()[ 1 ] *= 3 - QOut( "Times 3 : ", aFunc()[ 1 ] ) + ? "Times 3 : ", aFunc()[ 1 ] aFunc()[ 1 ] /= 1.5 - QOut( "Divide by 1.5 : ", aFunc()[ 1 ] ) + ? "Divide by 1.5 : ", aFunc()[ 1 ] aFunc()[ 1 ] %= 4 - QOut( "Modulus 4 : ", aFunc()[ 1 ] ) + ? "Modulus 4 : ", aFunc()[ 1 ] aFunc()[ 1 ] ^= 3 - QOut( "To the power 3 : ", aFunc()[ 1 ] ) + ? "To the power 3 : ", aFunc()[ 1 ] - QOut( "Global stack" ) + ? "Global stack" Debug( __dbgVMStkGList() ) // Please note a is a reference to aArray ! - QOut( "Statics" ) + ? "Statics" Debug( __dbgVMVarSList() ) RETURN @@ -61,3 +61,6 @@ FUNCTION aFunc() STATIC aArray := { [Test] } RETURN aArray + +STATIC PROCEDURE Debug() + RETURN diff --git a/harbour/tests/hbdoctst.prg b/harbour/tests/hbdoctst.prg index 6afe5234f2..29c1022b08 100644 --- a/harbour/tests/hbdoctst.prg +++ b/harbour/tests/hbdoctst.prg @@ -11,6 +11,7 @@ */ #include "directry.ch" +#include "simpleio.ch" PROCEDURE Main( cRoot ) LOCAL aEntry @@ -39,7 +40,7 @@ PROCEDURE Main( cRoot ) cDir := hb_DirSepAdd( cDir ) ENDIF - OutStd( "Root: " + cRoot + hb_eol() ) + ? "Root: " + cRoot aDir := { cRoot } @@ -69,11 +70,11 @@ PROCEDURE Main( cRoot ) or .pdf */ FOR EACH tmp IN aErrMsg - OutStd( tmp + hb_eol() ) + ? tmp NEXT IF ! Empty( aEntry ) - OutStd( __hbdoc_savehbd( cName, aEntry ), cName, Len( aEntry ), hb_eol() ) + ? __hbdoc_savehbd( cName, aEntry ), cName, Len( aEntry ) ENDIF NEXT diff --git a/harbour/tests/hsxtest.prg b/harbour/tests/hsxtest.prg index d4c7c848ec..259c27224b 100644 --- a/harbour/tests/hsxtest.prg +++ b/harbour/tests/hsxtest.prg @@ -16,33 +16,35 @@ //REQUEST RMDBFCDX PROCEDURE Main() + FIELD FIRST, LAST, STREET, CITY LOCAL n, hs - if ascan( rddList(1), "RMDBFCDX" ) != 0 + IF AScan( rddList( 1 ), "RMDBFCDX" ) != 0 rddSetDefault( "RMDBFCDX" ) - endif + ENDIF - use test shared - hs := HS_INDEX( "test", "FIRST+LAST+STREET+CITY", 2, 0, , .T., 3 ) + USE test shared + hs := hs_Index( "test", "FIRST+LAST+STREET+CITY", 2, 0, , .T., 3 ) /* Look for all records which have 'SHERMAN' string inside */ - HS_SET( hs, "SHERMAN" ) - while ( n := HS_NEXT( hs ) ) > 0 - dbgoto( n ) - if HS_VERIFY( hs ) > 0 - ? rtrim( FIRST+LAST+STREET+CITY ) - endif - enddo - wait + hs_Set( hs, "SHERMAN" ) + WHILE ( n := hs_Next( hs ) ) > 0 + dbGoto( n ) + IF hs_Verify( hs ) > 0 + ? RTrim( FIRST + LAST + STREET + CITY ) + ENDIF + ENDDO + WAIT /* Does RDD support Record Map Filters? */ - if dbinfo( DBI_RM_SUPPORTED ) + IF dbInfo( DBI_RM_SUPPORTED ) /* if yest then let set filter for all records with 'SHERMAN' word and look at them in browser */ - HS_FILTER( hs, "SHERMAN" ) - dbgotop() - browse() - endif - HS_CLOSE( hs ) -RETURN + hs_Filter( hs, "SHERMAN" ) + dbGoTop() + Browse() + ENDIF + hs_Close( hs ) + + RETURN diff --git a/harbour/tests/ifelse.prg b/harbour/tests/ifelse.prg index ae8d19b7d5..42def27016 100644 --- a/harbour/tests/ifelse.prg +++ b/harbour/tests/ifelse.prg @@ -2,37 +2,37 @@ * $Id$ */ -// Testing Harbour If elseif else endif +// Testing Harbour IF ELSEIF ELSE ENDIF PROCEDURE Main() LOCAL i - QOut( "Testing Harbour If elseif else endif" ) + ? "Testing Harbour IF ELSEIF ELSE ENDIF" FOR i := 1 TO 5 TestValue( i ) NEXT RETURN -FUNCTION TestValue( x ) +PROCEDURE TestValue( x ) - IF x = 1 - QOut( "x is 1" ) + IF x == 1 + ? "x is 1" - ELSEIF x = 2 - QOut( "x is 2" ) + ELSEIF x == 2 + ? "x is 2" - ELSEIF x = 3 - QOut( "x is 3" ) + ELSEIF x == 3 + ? "x is 3" - ELSEIF x = 4 - QOut( "x is 4" ) + ELSEIF x == 4 + ? "x is 4" ELSE - QOut( "x is not 1 or 2 or 3 or 4" ) + ? "x is not 1 or 2 or 3 or 4" ENDIF - QOut( "Ok!" ) + ? "Ok!" - RETURN NIL + RETURN diff --git a/harbour/tests/inifiles.prg b/harbour/tests/inifiles.prg index 810483445f..ce8da0928b 100644 --- a/harbour/tests/inifiles.prg +++ b/harbour/tests/inifiles.prg @@ -7,19 +7,19 @@ PROCEDURE Main( cFilename, cSection ) LOCAL oIni := TIniFile():New( Default( cFilename, "harbour.ini" ) ) LOCAL s, n := Val( Default( cSection, "1" ) ) - QOut( "" ) - QOut( "Sections:" ) + ? + ? "Sections:" s := oIni:ReadSections() AEval( s, {| x | QOut( "[" + x + "]" ) } ) - QOut( "" ) - QOut( "[" + s[ n ] + "]" ) + ? + ? "[" + s[ n ] + "]" s := oIni:ReadSection( s[ n ] ) AEval( s, {| x | QOut( x ) } ) oIni:WriteDate( "Date Test", "Today", Date() ) oIni:WriteBool( "Bool Test", "True", .T. ) - QOut( oIni:ReadBool( "Bool Test", "True", .F. ) ) + ? oIni:ReadBool( "Bool Test", "True", .F. ) oIni:UpdateFile() diff --git a/harbour/tests/initexit.prg b/harbour/tests/initexit.prg index c6db3cc89d..5ea5fd4345 100644 --- a/harbour/tests/initexit.prg +++ b/harbour/tests/initexit.prg @@ -12,48 +12,48 @@ PROCEDURE Main() STATIC static_var := "MAIN()" - QOut( "Hello from:", static_var ) - static_var_accessed_in_INIT_function ++ - QOut( "global static=", static_var_accessed_in_INIT_function ) + ? "Hello from:", static_var + static_var_accessed_in_INIT_function++ + ? "global static=", static_var_accessed_in_INIT_function // Use PUBLIC variable created in INIT PROCEDURE - QOut( "PUBLIC variable created in INIT PROCEDURE=", _initStatics ) + ? "PUBLIC variable created in INIT PROCEDURE=", _initStatics RETURN INIT FUNCTION SecondOne() STATIC static_var := "SECOND()" - QOut( "Hello from:", static_var ) - static_var_accessed_in_INIT_function ++ - QOut( "global static=", static_var_accessed_in_INIT_function ) + ? "Hello from:", static_var + static_var_accessed_in_INIT_function++ + ? "global static=", static_var_accessed_in_INIT_function RETURN NIL INIT FUNCTION Third() STATIC static_var := "THIRD()" - QOut( "Hello from:", static_var ) - static_var_accessed_in_INIT_function ++ - QOut( "global static=", static_var_accessed_in_INIT_function ) + ? "Hello from:", static_var + static_var_accessed_in_INIT_function++ + ? "global static=", static_var_accessed_in_INIT_function RETURN NIL EXIT FUNCTION Fifth() STATIC static_var := "FIFTH()" - QOut( "Hello from:", static_var ) - static_var_accessed_in_INIT_function -- - QOut( "global static=", static_var_accessed_in_INIT_function ) + ? "Hello from:", static_var + static_var_accessed_in_INIT_function-- + ? "global static=", static_var_accessed_in_INIT_function RETURN NIL EXIT FUNCTION Sixth() STATIC static_var := "SIXTH()" - QOut( "Hello from:", static_var ) - static_var_accessed_in_INIT_function -- - QOut( "global static=", static_var_accessed_in_INIT_function ) + ? "Hello from:", static_var + static_var_accessed_in_INIT_function-- + ? "global static=", static_var_accessed_in_INIT_function RETURN NIL diff --git a/harbour/tests/inkeytst.prg b/harbour/tests/inkeytst.prg index 2a12e49e3a..541f6a36f3 100644 --- a/harbour/tests/inkeytst.prg +++ b/harbour/tests/inkeytst.prg @@ -42,7 +42,8 @@ PROCEDURE Main( cSkip, cRaw ) TEST7( cSkip, cRaw ) ? - QUIT + + RETURN PROCEDURE Results() diff --git a/harbour/tests/inline.prg b/harbour/tests/inline.prg index 3a15902b56..55111b1b18 100644 --- a/harbour/tests/inline.prg +++ b/harbour/tests/inline.prg @@ -10,7 +10,7 @@ PROCEDURE Main() LOCAL oForm := TForm():New() - QOut( oForm:ClassName() ) + ? oForm:ClassName() oForm:cText := "Let's show a form here :-)" oForm:Show() diff --git a/harbour/tests/inline_c.prg b/harbour/tests/inline_c.prg index 431412916d..b703c03b64 100644 --- a/harbour/tests/inline_c.prg +++ b/harbour/tests/inline_c.prg @@ -4,9 +4,9 @@ PROCEDURE Main() - QOut( C_FUNC() ) + ? C_FUNC() - QOut( EndDumpTest() ) + ? EndDumpTest() RETURN diff --git a/harbour/tests/iotest.prg b/harbour/tests/iotest.prg index 9a56c7c8b4..c75ad50f85 100644 --- a/harbour/tests/iotest.prg +++ b/harbour/tests/iotest.prg @@ -11,23 +11,23 @@ PROCEDURE Main() LOCAL ntmp := 1 h := FCreate( "test.txt" ) - QOut( "create handle", h ) + ? "create handle", h FWrite( h, "This test worked if you can see this" ) FClose( h ) h := FOpen( "test.txt" ) - QOut( "open handle", h ) - QOut() + ? "open handle", h + ? /* try to read what is there */ DO WHILE ntmp != 0 ntmp := FRead( h, @cstr, 1 ) IF ntmp > 0 - QQOut( cstr ) + ?? cstr ENDIF ENDDO - QOut() + ? FClose( h ) diff --git a/harbour/tests/iotest2.prg b/harbour/tests/iotest2.prg index 26df94e163..8cbefea2bf 100644 --- a/harbour/tests/iotest2.prg +++ b/harbour/tests/iotest2.prg @@ -11,19 +11,19 @@ PROCEDURE Main() LOCAL cstr := " " h := FCreate( "test.txt" ) - QOut( "create handle", h ) + ? "create handle", h FWrite( h, "This test worked if you can see this" ) FClose( h ) h := FOpen( "test.txt" ) - QOut( "open handle", h ) - QOut() + ? "open handle", h + ? /* try to read what is there */ DO WHILE Asc( cstr ) != 0 cstr := FReadStr( h, 1 ) - QQOut( cstr ) + ?? cstr ENDDO FClose( h ) diff --git a/harbour/tests/ipclnt.prg b/harbour/tests/ipclnt.prg index b474ddcc87..2118e868b3 100644 --- a/harbour/tests/ipclnt.prg +++ b/harbour/tests/ipclnt.prg @@ -8,7 +8,7 @@ #define ADDRESS "127.0.0.1" #define PORT 10000 -#define EOT ( Chr( 4 ) ) +#define EOT hb_BChar( 4 ) PROCEDURE Main() @@ -21,10 +21,10 @@ PROCEDURE Main() ? "socket connect error " + hb_ntos( hb_socketGetError() ) ENDIF - ? hb_socketSend( hSocket, "hi" + EOT ) - ? hb_socketSend( hSocket, "how" + EOT ) - ? hb_socketSend( hSocket, "you doing?" + EOT ) - ? hb_socketSend( hSocket, "quit" + EOT ) + ? hb_socketSend( hSocket, "hi" + EOT ) + ? hb_socketSend( hSocket, "how" + EOT ) + ? hb_socketSend( hSocket, "you doing?" + EOT ) + ? hb_socketSend( hSocket, "quit" + EOT ) hb_socketShutdown( hSocket ) hb_socketClose( hSocket ) diff --git a/harbour/tests/ipsvr.prg b/harbour/tests/ipsvr.prg index 8764257c96..4dde2f4248 100644 --- a/harbour/tests/ipsvr.prg +++ b/harbour/tests/ipsvr.prg @@ -8,10 +8,12 @@ #define ADDRESS "0.0.0.0" #define PORT 10000 -#define EOT ( Chr( 4 ) ) -#define TIMEOUT 3000 // 3s +#define EOT hb_BChar( 4 ) +#define TIMEOUT 3000 // 3 seconds +#ifndef __HBSCRIPT__HBSHELL REQUEST HB_MT +#endif PROCEDURE Main() @@ -66,10 +68,10 @@ PROCEDURE process( hSocket ) DO WHILE .T. cRequest := "" nLen := 1 - DO WHILE At( EOT, cRequest ) == 0 .AND. nLen > 0 + DO WHILE hb_BAt( EOT, cRequest ) == 0 .AND. nLen > 0 cBuf := Space( 4096 ) IF ( nLen := hb_socketRecv( hSocket, @cBuf,,, 10000 ) ) > 0 /* Timeout */ - cRequest += Left( cBuf, nLen ) + cRequest += hb_BLeft( cBuf, nLen ) ELSE IF nLen == -1 .AND. hb_socketGetError() == HB_SOCKET_ERR_TIMEOUT nLen := 0 @@ -77,7 +79,7 @@ PROCEDURE process( hSocket ) ENDIF ENDDO - IF nLen == - 1 + IF nLen == -1 ? "recv() error:", hb_socketGetError() ELSEIF nLen == 0 ? "connection closed" diff --git a/harbour/tests/longstr.prg b/harbour/tests/longstr.prg index bc44611e96..6c200d464f 100644 --- a/harbour/tests/longstr.prg +++ b/harbour/tests/longstr.prg @@ -7,10 +7,12 @@ // // Placed in the public domain +#include "simpleio.ch" + PROCEDURE Main() LOCAL c := "This is a very long string. This may seem silly however strings like this are still used. Not by good programmers though, but I've seen stuff like this used for Copyright messages and other long text. What is the point to all of this you'd say. Well I am coming to the point right now, the constant string is limited to 256 characters and this string is a lot bigger. Do you get my drift ? If there is somebody who has read this line upto the very end: Esto es un sombrero grande ridiculo." + Chr( 13 ) + Chr( 10 ) + "/" + Chr( 13 ) + Chr( 10 ) + "[;-)" + Chr( 13 ) + Chr( 10 ) + "\" - OutStd( c ) + ? c RETURN diff --git a/harbour/tests/mathtest.prg b/harbour/tests/mathtest.prg index 02444a675e..30761871e0 100644 --- a/harbour/tests/mathtest.prg +++ b/harbour/tests/mathtest.prg @@ -9,58 +9,58 @@ PROCEDURE Main() LOCAL nOldMathErrMode LOCAL bOldMathErr - QOut( "Testing math function: EXP(), LOG() and SQRT():" ) - QOut( "" ) - QOut( " I) Test with correct arguments:" ) - QOut( " exp(0.0) == 1.00 ? ", Exp( 0.0 ) ) - QOut( " exp(1.0) == 2.71(8)... ? ", Exp( 1.0 ) ) - QOut( " exp(-1.0) == 0.36(7)... ? ", Exp( - 1.0 ) ) - QOut( "" ) - QOut( " log(1.0) == 0.00 ? ", Log( 1.0 ) ) - QOut( " log(2.7) == 0.99(3)... ? ", Log( 2.7 ) ) - QOut( " log(0.36) == -1.02(1)... ? ", Log( 0.36 ) ) - QOut( "" ) - QOut( " sqrt(1.0) == 1.00 ? ", Sqrt( 1.0 ) ) - QOut( " sqrt(4.0) == 2.00 ? ", Sqrt( 4.0 ) ) - QOut( " sqrt(2.0) == 1.41(4).. ? ", Sqrt( 2.0 ) ) - QOut( "" ) - QOut( " II) Test with numeric but incorrect arguments:" ) - QOut( "" ) - QOut( " IIa) default error handling(by the functions themselves)" ) - QOut( " exp(-1000) == 0.00 ?", Exp( - 1000 ) ) - QOut( " exp(1000) == ****... ?", Exp( 1000 ) ) - QOut( "" ) - QOut( " log(0) == ****... ?", Log( 0 ) ) - QOut( " log(-10) == *****... ?", Log( - 10 ) ) - QOut( "" ) - QOut( " sqrt(-4) == 0.00 ?", Sqrt( - 4 ) ) - QOut( "" ) + ? "Testing math function: EXP(), LOG() and SQRT():" + ? + ? " I) Test with correct arguments:" + ? " exp(0.0) == 1.00 ? ", Exp( 0.0 ) + ? " exp(1.0) == 2.71(8)... ? ", Exp( 1.0 ) + ? " exp(-1.0) == 0.36(7)... ? ", Exp( - 1.0 ) + ? + ? " log(1.0) == 0.00 ? ", Log( 1.0 ) + ? " log(2.7) == 0.99(3)... ? ", Log( 2.7 ) + ? " log(0.36) == -1.02(1)... ? ", Log( 0.36 ) + ? + ? " sqrt(1.0) == 1.00 ? ", Sqrt( 1.0 ) + ? " sqrt(4.0) == 2.00 ? ", Sqrt( 4.0 ) + ? " sqrt(2.0) == 1.41(4).. ? ", Sqrt( 2.0 ) + ? + ? " II) Test with numeric but incorrect arguments:" + ? + ? " IIa) default error handling(by the functions themselves)" + ? " exp(-1000) == 0.00 ?", Exp( -1000 ) + ? " exp(1000) == ****... ?", Exp( 1000 ) + ? + ? " log(0) == ****... ?", Log( 0 ) + ? " log(-10) == *****... ?", Log( -10 ) + ? + ? " sqrt(-4) == 0.00 ?", Sqrt( -4 ) + ? nOldMathErrMode := hb_matherMode( HB_MATH_ERRMODE_USERDEFAULT ) - QOut( " IIb) error handling by error(hb_MathErMode() == HB_MATH_ERRMODE_USERDEFAULT)" ) - QOut( " exp(-1000) == 0.00 ?", Exp( - 1000 ) ) - QOut( " exp(1000) == ****... ?", Exp( 1000 ) ) - QOut( "" ) - QOut( " log(0) == ****... ?", Log( 0 ) ) - QOut( " log(-10) == *****... ?", Log( - 10 ) ) - QOut( "" ) - QOut( " sqrt(-4) == 0.00 ?", Sqrt( - 4 ) ) - QOut( "" ) + ? " IIb) error handling by error(hb_MathErMode() == HB_MATH_ERRMODE_USERDEFAULT)" + ? " exp(-1000) == 0.00 ?", Exp( -1000 ) + ? " exp(1000) == ****... ?", Exp( 1000 ) + ? + ? " log(0) == ****... ?", Log( 0 ) + ? " log(-10) == *****... ?", Log( -10 ) + ? + ? " sqrt(-4) == 0.00 ?", Sqrt( -4 ) + ? hb_matherMode( nOldMathErrMode ) bOldMathErr := hb_matherBlock( {| nType, cFuncname, cError, nArg1, nArg2, aInfo |; localmatherr( nType, cFuncname, cError, nArg1, nArg2, aInfo ) } ) - QOut( " IIc) error handling by callback block(hb_MathErBlock())" ) - QOut( " exp(-1000) == ?", Exp( - 1000 ) ) - QOut( " exp(1000) == ?", Exp( 1000 ) ) - QOut( "" ) - QOut( " log(0) == ?", Log( 0 ) ) - QOut( " log(-10) == ?", Log( - 10 ) ) - QOut( "" ) - QOut( " sqrt(-4) == ?", Sqrt( - 4 ) ) + ? " IIc) error handling by callback block(hb_MathErBlock())" + ? " exp(-1000) == ?", Exp( -1000 ) + ? " exp(1000) == ?", Exp( 1000 ) + ? + ? " log(0) == ?", Log( 0 ) + ? " log(-10) == ?", Log( -10 ) + ? + ? " sqrt(-4) == ?", Sqrt( -4 ) hb_matherBlock( bOldMathErr ) @@ -70,24 +70,24 @@ FUNCTION localmatherr( nType, cFuncname, cError, nArg1, nArg2, aInfo ) LOCAL cStr := "!! Local handling of math error MATH/" - cStr += AllTrim( Str( nType ) ) + " in " + cFuncname + "(" + cStr += hb_ntos( nType ) + " in " + cFuncname + "(" IF ValType( nArg1 ) == "N" - cStr += AllTrim( Str( nArg1 ) ) + cStr += hb_ntos( nArg1 ) ENDIF IF ValType( nArg2 ) == "N" - cStr += "," + AllTrim( Str( nArg2 ) ) + cStr += "," + hb_ntos( nArg2 ) ENDIF cStr += "):" - QOut( cStr ) - QOut( "!! " + cError ) + ? cStr + ? "!! " + cError IF aInfo[HB_MATHERRORBLOCK_HANDLED] - QOut( "!! --> already handled with return value: " + ; - AllTrim( Str( aInfo[HB_MATHERRORBLOCK_RETVAL] ) ) ) + ? "!! --> already handled with return value: " + ; + hb_ntos( aInfo[HB_MATHERRORBLOCK_RETVAL] ) RETURN 1 ENDIF - QOut( "!! setting return value to --> 5.0" ) + ? "!! setting return value to --> 5.0" aInfo[ HB_MATHERRORBLOCK_RETVAL ] := 5.0 aInfo[ HB_MATHERRORBLOCK_HANDLED ] := .T. diff --git a/harbour/tests/memvar.prg b/harbour/tests/memvar.prg index fccbe1b24a..c0977d8218 100644 --- a/harbour/tests/memvar.prg +++ b/harbour/tests/memvar.prg @@ -62,13 +62,13 @@ PROCEDURE Test1() // PUBLIC overrided by PRIVATE overrided by uninitialized PUBLIC PUBL memvar1 - QOut( "==Test 1==PUBLIC -> PRIVATE -> PUBLIC" ) - QOut( memvar1 ) + ? "==Test 1==PUBLIC -> PRIVATE -> PUBLIC" + ? memvar1 memvar1 := "main" - QOut( "in MAIN=", memvar1 ) + ? "in MAIN=", memvar1 Scope( memvar1 ) - QOut( "back in MAIN=", memvar1 ) - QOut( "" ) + ? "back in MAIN=", memvar1 + ? RETURN @@ -77,7 +77,7 @@ FUNCTION Scope( value ) PRIVA memvar1 := "scope" Scope2() - QOut( "in SCOPE=", memvar1 ) + ? "in SCOPE=", memvar1 RETURN value @@ -85,7 +85,7 @@ PROCEDURE Scope2() PUBLIC memvar1 - QOut( "in SCOPE2=", memvar1 ) + ? "in SCOPE2=", memvar1 RETURN @@ -96,13 +96,13 @@ PROCEDURE Test2() // PUBLIC overrided by PUBLIC overrided by uninitialized PUBLIC PUBLIC memvar2 - QOut( "==Test 2==PUBLIC -> PUBLIC -> PUBLIC" ) - QOut( memvar2 ) + ? "==Test 2==PUBLIC -> PUBLIC -> PUBLIC" + ? memvar2 memvar2 := "main" - QOut( "in MAIN=", memvar2 ) + ? "in MAIN=", memvar2 Scope3( memvar2 ) - QOut( "back in MAIN=", memvar2 ) - QOut( "" ) + ? "back in MAIN=", memvar2 + ? RETURN @@ -111,7 +111,7 @@ FUNCTION Scope3( value ) PUBLIC memvar2 := "scope" Scope4() - QOut( "in SCOPE=", memvar2 ) + ? "in SCOPE=", memvar2 RETURN value @@ -119,7 +119,7 @@ PROCEDURE Scope4() PUBLIC memvar2 - QOut( "in SCOPE2=", memvar2 ) + ? "in SCOPE2=", memvar2 RETURN @@ -130,13 +130,13 @@ PROCEDURE Test3() // PUBLIC overrided by PRIVATE overrided by initialized PUBLIC PUBLIC memvar3 - QOut( "==Test 3==PUBLIC -> PRIVATE -> PUBLIC:=" ) - QOut( memvar3 ) + ? "==Test 3==PUBLIC -> PRIVATE -> PUBLIC:=" + ? memvar3 memvar3 := "main" - QOut( "in MAIN=", memvar3 ) + ? "in MAIN=", memvar3 Scope5( memvar3 ) - QOut( "back in MAIN=", memvar3 ) - QOut( "" ) + ? "back in MAIN=", memvar3 + ? RETURN @@ -145,7 +145,7 @@ FUNCTION Scope5( value ) PRIVATE memvar3 := "scope" Scope6() - QOut( "in SCOPE=", memvar3 ) + ? "in SCOPE=", memvar3 RETURN value @@ -153,7 +153,7 @@ PROCEDURE Scope6() PUBLIC memvar3 := "scope2" - QOut( "in SCOPE2=", memvar3 ) + ? "in SCOPE2=", memvar3 RETURN @@ -170,7 +170,7 @@ PROCEDURE Test4() QOut( "in MAIN=", memvar4 ) Scope7( memvar4 ) QOut( "back in MAIN=", memvar4 ) - QOut( "" ) + ? RETURN @@ -179,7 +179,7 @@ FUNCTION Scope7( value ) PUBLIC memvar4 := "scope" Scope8() - QOut( "in SCOPE=", memvar4 ) + ? "in SCOPE=", memvar4 RETURN value @@ -187,7 +187,7 @@ PROCEDURE Scope8() PUBLIC memvar4 := "scope2" - QOut( "in SCOPE2=", memvar4 ) + ? "in SCOPE2=", memvar4 RETURN @@ -201,32 +201,32 @@ PROCEDURE TEST5() PRIVATE memprivate PARAMETERS memparam - QOut( "==Test for memvars passed by reference and __PUBLIC/__PRIVATE " ) - QOut( " uninitialized PUBLIC= ", mempublic ) - // QOut( "uninitialized PUBLIC array (first item)=", public2[ 1 ] ) - QOut( "initialized PUBLIC= ", public3 ) - QOut( " uninitialized PRIVATE= ", memprivate ) - QOut( "uninitialized PARAMETER= ", memparam ) - // QOut( memnone ) + ? "==Test for memvars passed by reference and __PUBLIC/__PRIVATE " + ? " uninitialized PUBLIC= ", mempublic +// ? "uninitialized PUBLIC array (first item)=", public2[ 1 ] + ? "initialized PUBLIC= ", public3 + ? " uninitialized PRIVATE= ", memprivate + ? "uninitialized PARAMETER= ", memparam +// ? memnone mempublic := "PUBLIC" - QOut( " PUBLIC with new value= ", mempublic ) + ? " PUBLIC with new value= ", mempublic memprivate := "PRIVATE" - QOut( " PRIVATE with new value= ", memprivate ) + ? " PRIVATE with new value= ", memprivate memparam := "PARAMETER" - QOut( "PARAMETER with new value= ", memparam ) - // memnone =4 - // Qout( memnone ) + ? "PARAMETER with new value= ", memparam +// memnone := 4 +// ? memnone - QOut( " PUBLIC after passing by reference= ", UseVar( @mempublic ) ) - QOut( " PRIVATE after passing by reference= ", UseVar( @memprivate ) ) - QOut( "PARAMETER after passing by reference= ", UseVar( @memparam ) ) - // Qout( Use( @memnone ) ) + ? " PUBLIC after passing by reference= ", UseVar( @mempublic ) + ? " PRIVATE after passing by reference= ", UseVar( @memprivate ) + ? "PARAMETER after passing by reference= ", UseVar( @memparam ) +// QOut( Use( @memnone ) ) #ifdef __HARBOUR__ - QOut( "PUBLIC created by __PUBLIC function=", public1 ) + ? "PUBLIC created by __PUBLIC function=", public1 #endif - QOut( "" ) + ? RETURN @@ -236,16 +236,16 @@ FUNCTION UseVar( value ) #ifdef __HARBOUR__ __mvPublic( "public1" ) //, "public21" ) - // __mvPRIVATE( "private1", "private2", "private3" ) +// __mvPRIVATE( "private1", "private2", "private3" ) __mvPrivate( { "private1", "private2", "private3" } ) - QOut( "undeclared PUBLIC created by __PUBLIC function=", public1 ) - QOut( "undeclared PRIVATE created by __PRIVATE function=", private1 ) - QOut( "undeclared PRIVATE created by __PRIVATE function=", private2 ) - QOut( "undeclared PRIVATE created by __PRIVATE function=", private3 ) + ? "undeclared PUBLIC created by __PUBLIC function=", public1 + ? "undeclared PRIVATE created by __PRIVATE function=", private1 + ? "undeclared PRIVATE created by __PRIVATE function=", private2 + ? "undeclared PRIVATE created by __PRIVATE function=", private3 public1 := "public created by __PUBLIC" #endif - QOut( "" ) + ? RETURN value @@ -262,9 +262,9 @@ PROCEDURE Test6() PUBLIC publCB PRIVATE privVar := " (PRIVATE in MAIN) " - QOut( "== Test for detached PRIVATE variables" ) + ? "== Test for detached PRIVATE variables" DetachMemvar( "detached memvar" ) - QOut( Eval( publCB, "in Main: " ) ) + ? Eval( publCB, "in Main: " ) RETURN @@ -273,7 +273,7 @@ PROCEDURE DetachMemvar( cValue ) PRIVATE privVar := " (PRIVATE in DetachMemvar) " publCB := {| x | x + privVar + cValue } - QOut( Eval( publCB, "in DetachMemvar: " ) ) + ? Eval( publCB, "in DetachMemvar: " ) RETURN @@ -284,10 +284,10 @@ PROCEDURE Test7( ) PARAMETERS para1, para2, para3 PARAM parameter1again - QOut( "Parameter 1 =", para1 ) - QOut( "Parameter 2 =", para2 ) - QOut( "Parameter 3 =", para3 ) - QOut( "Parameter 4 =", parameter1again ) + ? "Parameter 1 =", para1 + ? "Parameter 2 =", para2 + ? "Parameter 3 =", para3 + ? "Parameter 4 =", parameter1again RETURN @@ -297,19 +297,19 @@ PROCEDURE Test8() PRIVATE private1 := "PRIVATE1" - QOut( "In Test8 before UsePriv" ) - QOut( "Private1 = ", private1 ) + ? "In Test8 before UsePriv" + ? "Private1 = ", private1 UsePriv( private1 ) - QOut( "In Test8 after UsePriv" ) - QOut( "Private1 = ", private1 ) + ? "In Test8 after UsePriv" + ? "Private1 = ", private1 __Accept( "press Enter..." ) - QOut( "In Test8 before UsePriv with reference" ) - QOut( "Private1 = ", private1 ) + ? "In Test8 before UsePriv with reference" + ? "Private1 = ", private1 UsePriv( @private1 ) - QOut( "In Test8 after UsePriv with reference" ) - QOut( "Private1 = ", private1 ) + ? "In Test8 after UsePriv with reference" + ? "Private1 = ", private1 RETURN @@ -317,13 +317,13 @@ PROCEDURE UsePriv() PARAMETERS param1 - QOut( "In UsePriv before UseParam" ) - QOut( "Private1 = ", private1 ) - QOut( "Param1 = ", param1 ) + ? "In UsePriv before UseParam" + ? "Private1 = ", private1 + ? "Param1 = ", param1 UseParam() - QOut( "In UsePriv after UseParam" ) - QOut( "Private1 = ", private1 ) - QOut( "Param1 = ", param1 ) + ? "In UsePriv after UseParam" + ? "Private1 = ", private1 + ? "Param1 = ", param1 RETURN @@ -331,16 +331,16 @@ PROCEDURE UseParam() PARAMETER param2 - QOut( "In UseParam before assignment" ) - QOut( "Private1 = ", private1 ) - QOut( "Param1 = ", param1 ) - QOut( "Param2 = ", param2 ) + ? "In UseParam before assignment" + ? "Private1 = ", private1 + ? "Param1 = ", param1 + ? "Param2 = ", param2 param2 := "PARAM2" param1 := "new value" - QOut( "In UseParam after assignment" ) - QOut( "Private1 = ", private1 ) - QOut( "Param1 = ", param1 ) - QOut( "Param2 = ", param2 ) + ? "In UseParam after assignment" + ? "Private1 = ", private1 + ? "Param1 = ", param1 + ? "Param2 = ", param2 RETURN @@ -353,13 +353,13 @@ PROCEDURE TEST9() memvar := 19 - QOut( "Variable with the name of module (memvar)=", memvar ) + ? "Variable with the name of module (memvar)=", memvar memfunc := 33 - QOut( "Variable with the name of function =", memfunc ) - QOut( "Return value from a function=", memfunc( 9 ) ) + ? "Variable with the name of function =", memfunc + ? "Return value from a function=", memfunc( 9 ) - // mem() +// mem() RETURN @@ -370,10 +370,10 @@ STATIC FUNCTION memfunc( memfunc ) INIT PROCEDURE initmem() PARA MEMVAR PARA initmem - QOut( "Tests for PARAMETERS, PRIVATE nad PUBLIC variables" ) - QOut( "" ) - QOut( "in INIT function - Passed parameter = ", memvar ) - QOut( "in INIT function - Passed parameter with different name = ", initmem ) - QOut( "" ) + ? "Tests for PARAMETERS, PRIVATE nad PUBLIC variables" + ? + ? "in INIT function - Passed parameter = ", memvar + ? "in INIT function - Passed parameter with different name = ", initmem + ? RETURN diff --git a/harbour/tests/multiarg.prg b/harbour/tests/multiarg.prg index 8907d1b757..429e11161e 100644 --- a/harbour/tests/multiarg.prg +++ b/harbour/tests/multiarg.prg @@ -33,6 +33,6 @@ FUNCTION ShoutArg( nArg, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 ) HB_SYMBOL_UNUSED( x9 ) HB_SYMBOL_UNUSED( x10 ) - QOut( nArg, "==", hb_PValue( nArg ) ) + ? nArg, "==", hb_PValue( nArg ) RETURN NIL diff --git a/harbour/tests/nums.prg b/harbour/tests/nums.prg index e278220cd6..dfb0e81841 100644 --- a/harbour/tests/nums.prg +++ b/harbour/tests/nums.prg @@ -13,11 +13,11 @@ PROCEDURE Main() LOCAL e := 0xABAB // Automatic support for hexadecimal numbers LOCAL f := .12 - QOut( a ) - QOut( b ) - QOut( c ) - QOut( d ) - QOut( e ) - QOut( f ) + ? a + ? b + ? c + ? d + ? e + ? f RETURN diff --git a/harbour/tests/objarr.prg b/harbour/tests/objarr.prg index 601dbf6536..5381634058 100644 --- a/harbour/tests/objarr.prg +++ b/harbour/tests/objarr.prg @@ -15,48 +15,48 @@ PROCEDURE Main() LOCAL o := TNumber():New() - QOut( "Direct reference : ", ToChar( o:x ) ) + ? "Direct reference : ", hb_ValToStr( o:x ) o:x[ 1 ] := "I am a data" o:Get()[ 2 ] := "I am a method" - QOut( "Assign text : ", ToChar( o:x ) ) + ? "Assign text : ", hb_ValToStr( o:x ) o:x[ 1 ] := 4 o:Get()[ 2 ] := 4 - QOut( "Assign 4 : ", ToChar( o:x ) ) + ? "Assign 4 : ", hb_ValToStr( 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 ] ) + ? "Post increment : ", o:x[ 1 ]++ , o:Get()[ 2 ]++ + ? "After : ", o:x[ 1 ] , o:Get()[ 2 ] + ? "Pre decrement : ", --o:x[ 1 ] , --o:Get()[ 2 ] + ? "After : ", o:x[ 1 ] , o:Get()[ 2 ] o:x[ 1 ] += 2 o:Get()[ 2 ] += 2 - QOut( "Plus 2 : ", ToChar( o:x ) ) + ? "Plus 2 : ", hb_ValToStr( o:x ) o:x[ 1 ] -= 3 o:Get()[ 2 ] -= 3 - QOut( "Minus 3 : ", ToChar( o:x ) ) + ? "Minus 3 : ", hb_ValToStr( o:x ) o:x[ 1 ] *= 3 o:Get()[ 2 ] *= 3 - QOut( "Times 3 : ", ToChar( o:x ) ) + ? "Times 3 : ", hb_ValToStr( o:x ) o:x[ 1 ] /= 1.5 o:Get()[ 2 ] /= 1.5 - QOut( "Divide by 1.5 : ", ToChar( o:x ) ) + ? "Divide by 1.5 : ", hb_ValToStr( o:x ) o:x[ 1 ] %= 4 o:Get()[ 2 ] %= 4 - QOut( "Modulus 4 : ", ToChar( o:x ) ) + ? "Modulus 4 : ", hb_ValToStr( o:x ) o:x[ 1 ] ^= 3 o:Get()[ 2 ] ^= 3 - QOut( "To the power 3 : ", ToChar( o:x ) ) + ? "To the power 3 : ", hb_ValToStr( o:x ) - QOut( "Global stack" ) + ? "Global stack" Debug( __dbgVMStkGList() ) - QOut( "Statics" ) + ? "Statics" Debug( __dbgVMVarSList() ) RETURN @@ -88,4 +88,7 @@ STATIC FUNCTION Get() LOCAL self := QSelf() - return ::x + RETURN ::x + +STATIC PROCEDURE Debug() + RETURN diff --git a/harbour/tests/objasign.prg b/harbour/tests/objasign.prg index aa759658b2..8ab573cb62 100644 --- a/harbour/tests/objasign.prg +++ b/harbour/tests/objasign.prg @@ -15,40 +15,40 @@ PROCEDURE Main() LOCAL o := TNumber():New() - QOut( "Direct reference : ", o:x ) + ? "Direct reference : ", o:x o:x := "I am a data" - QOut( "Assign text : ", o:x ) + ? "Assign text : ", o:x o:x := 4 - QOut( "Assign 4 : ", o:x ) + ? "Assign 4 : ", o:x - QOut( "Post increment : ", o:x++ ) - QOut( "After : ", o:x ) - QOut( "Pre decrement : ", --o:x ) - QOut( "After : ", o:x ) + ? "Post increment : ", o:x++ + ? "After : ", o:x + ? "Pre decrement : ", --o:x + ? "After : ", o:x o:x += 2 - QOut( "Plus 2 : ", o:x ) + ? "Plus 2 : ", o:x o:x -= 3 - QOut( "Minus 3 : ", o:x ) + ? "Minus 3 : ", o:x o:x *= 3 - QOut( "Times 3 : ", o:x ) + ? "Times 3 : ", o:x o:x /= 1.5 - QOut( "Divide by 1.5 : ", o:x ) + ? "Divide by 1.5 : ", o:x o:x %= 4 - QOut( "Modulus 4 : ", o:x ) + ? "Modulus 4 : ", o:x o:x ^= 3 - QOut( "To the power 3 : ", o:x ) + ? "To the power 3 : ", o:x - QOut( "Global stack" ) + ? "Global stack" Debug( __dbgVMStkGList() ) - QOut( "Statics" ) + ? "Statics" Debug( __dbgVMVarSList() ) RETURN @@ -74,3 +74,6 @@ STATIC FUNCTION New() ::x := 1 RETURN self + +STATIC PROCEDURE Debug() + RETURN diff --git a/harbour/tests/objects.prg b/harbour/tests/objects.prg index 4b39500b60..192166334b 100644 --- a/harbour/tests/objects.prg +++ b/harbour/tests/objects.prg @@ -11,15 +11,15 @@ PROCEDURE Main() LOCAL oObject := TAny():New() - QOut( ValType( oObject ) ) - QOut( Len( oObject ) ) // 3 datas ! - QOut( oObject:ClassH() ) // retrieves the handle of its class + ? ValType( oObject ) + ? Len( oObject ) // 3 datas ! + ? oObject:ClassH() // retrieves the handle of its class - QOut( oObject:ClassName() ) // retrieves its class name + ? oObject:ClassName() // retrieves its class name oObject:Test() // This invokes the below defined Test function // See QSelf() and :: use - QOut( oObject:cName ) + ? oObject:cName oObject:DoNothing() // a virtual method does nothing, // but it is very usefull for Classes building logic @@ -47,8 +47,8 @@ STATIC FUNCTION New() LOCAL Self := QSelf() - QOut( ValType( Self ) ) - QOut( "Inside New()" ) + ? ValType( Self ) + ? "Inside New()" ::cName := "Harbour OOP" @@ -58,8 +58,8 @@ STATIC FUNCTION Test() LOCAL Self := QSelf() // We access Self for this method - QOut( "Test method invoked!" ) + ? "Test method invoked!" - QOut( ::ClassName() ) // :: means Self: It is a Harbour built-in operator + ? ::ClassName() // :: means Self: It is a Harbour built-in operator RETURN NIL diff --git a/harbour/tests/os.prg b/harbour/tests/os.prg index 2911878e46..ef4c3a8e86 100644 --- a/harbour/tests/os.prg +++ b/harbour/tests/os.prg @@ -6,6 +6,6 @@ PROCEDURE Main() - QOut( OS() ) + ? OS() RETURN diff --git a/harbour/tests/overload.prg b/harbour/tests/overload.prg index f30f274fa5..295463109a 100644 --- a/harbour/tests/overload.prg +++ b/harbour/tests/overload.prg @@ -17,31 +17,31 @@ PROCEDURE Main() LOCAL oString := TString():New( "Hello" ) - QOut( "Testing TString with Operator Overloading" ) - QOut( oString:cValue ) - QOut( "---" ) + ? "Testing TString with Operator Overloading" + ? oString:cValue + ? "---" ? ValType( oString ) - QOut( "Equal........:", oString = "Hello" ) - QOut( "Exactly Equal:", oString == "Hello" ) - QOut( "Not Equal != :", oString != "Hello" ) - QOut( "Not Equal <> :", oString <> "Hello" ) - QOut( "Not Equal # :", oString # "Hello" ) - QOut( "Substring $ :", oString $ "Hello" ) - QOut( "Less than :", oString < "Hello" ) - QOut( "Less than or Equal:", oString <= "Hello" ) - QOut( "Greater than :", oString > "Hello" ) - QOut( "Greater than or Equal:", oString >= "Hello" ) - QOut( "Concatenation + :", oString + "Hello" ) - QOut( "Concatenation - :", oString - "Hello" ) - QOut( "Array index[2] :", oString[ 2 ] ) - QOut( "Array index[3] := 'X' :", oString[ 3 ] := 'X' ) - QOut( oString:cValue ) + ? "Equal........:", oString = "Hello" + ? "Exactly Equal:", oString == "Hello" + ? "Not Equal != :", oString != "Hello" + ? "Not Equal <> :", oString <> "Hello" + ? "Not Equal # :", oString # "Hello" + ? "Substring $ :", oString $ "Hello" + ? "Less than :", oString < "Hello" + ? "Less than or Equal:", oString <= "Hello" + ? "Greater than :", oString > "Hello" + ? "Greater than or Equal:", oString >= "Hello" + ? "Concatenation + :", oString + "Hello" + ? "Concatenation - :", oString - "Hello" + ? "Array index[2] :", oString[ 2 ] + ? "Array index[3] := 'X' :", oString[ 3 ] := 'X' + ? oString:cValue RETURN -CREATE CLASS tString +CREATE CLASS TString VAR cValue @@ -62,43 +62,3 @@ CREATE CLASS tString SubStr( ::cValue, nIndex, 1 ) ) ENDCLASS - -/* - -FUNCTION TString() - - STATIC oClass - - IF oClass == NIL - oClass = HBClass():New( "TSTRING" ) // starts a new class definition - - oClass:AddData( "cValue" ) // define this class objects datas - - oClass:AddMethod( "New", @New() ) - - oClass:AddInline( "==", {| self, cTest | ::cValue == cTest } ) - oClass:AddInline( "!=", {| self, cTest | ::cValue != cTest } ) - oClass:AddInline( "<" , {| self, cTest | ::cValue < cTest } ) - oClass:AddInline( "<=", {| self, cTest | ::cValue <= cTest } ) - oClass:AddInline( ">" , {| self, cTest | ::cValue > cTest } ) - oClass:AddInline( ">=", {| self, cTest | ::cValue >= cTest } ) - oClass:AddInline( "+" , {| self, cTest | ::cValue + cTest } ) - oClass:AddInline( "-" , {| self, cTest | ::cValue - cTest } ) - oClass:AddInline( "$" , {| self, cTest | ::cValue $ cTest } ) - - oClass:AddInline( "HasMsg", {| self, cMsg | __objHasMsg( QSelf(), cMsg ) } ) - - oClass:Create() // builds this class - ENDIF - - RETURN oClass:Instance() // builds an object of this class - -STATIC FUNCTION New( cText ) - - LOCAL Self := QSelf() - - ::cValue := cText - - RETURN Self - -*/ diff --git a/harbour/tests/parexpr.prg b/harbour/tests/parexpr.prg index d92d8e691c..2f1ef2ae8e 100644 --- a/harbour/tests/parexpr.prg +++ b/harbour/tests/parexpr.prg @@ -14,8 +14,8 @@ #endif PROCEDURE Main() - Local x - Local y + LOCAL x + LOCAL y // Simple one to start with. x := ( 1 ) @@ -47,23 +47,23 @@ PROCEDURE Main() // Now mix with statements and functions ? ( 1, 2, 3 ) - If ( y := .t. ) + IF ( y := .t. ) ? "Working" - Else + ELSE ? "Borken" - EndIf + ENDIF - If ( x := 10, y := ( x == 10 ) ) + IF ( x := 10, y := ( x == 10 ) ) ? "Working" - Else + ELSE ? "Broken" - EndIf + ENDIF - If ( Something( 1, 2, 3 ), .T. ) + IF ( Something( 1, 2, 3 ), .T. ) ? "Working" - Else + ELSE ? "Broken" - EndIf + ENDIF ? @@ -79,15 +79,15 @@ PROCEDURE Main() * because IF token followed by any three expressions is interpreted * as IIF inline */ -// IF( .T., .F., .T. ) -// ? "Working" -// ELSE -// ? "Broken" -// ENDIF +// IF( .T., .F., .T. ) +// ? "Working" +// ELSE +// ? "Broken" +// ENDIF - Return + RETURN -Static Function Something( x, y, z ) +STATIC FUNCTION Something( x, y, z ) // This does something and it does it well/ diff --git a/harbour/tests/passref.prg b/harbour/tests/passref.prg index a993e3dcd3..da653aedea 100644 --- a/harbour/tests/passref.prg +++ b/harbour/tests/passref.prg @@ -9,12 +9,12 @@ PROCEDURE Main() LOCAL a := 10 LOCAL b := "X" - QOut( 'a := 10', a ) - QOut( 'b := "X"', b ) + ? 'a := 10', a + ? 'b := "X"', b testfun( @a, @b ) - QOut( 'return of "a" should = 20', a, iif( a == 20,"worked","failed" ) ) - QOut( 'return of "b" should = A', b, iif( b == "A","worked","failed" ) ) + ? 'return of "a" should = 20', a, iif( a == 20, "worked", "failed" ) + ? 'return of "b" should = A', b, iif( b == "A", "worked", "failed" ) RETURN @@ -22,7 +22,7 @@ FUNCTION testfun( b, c ) b := b + 10 c := "A" - QOut( 'a pointer+10 =', b ) - QOut( 'b pointer := "A" =', c ) + ? 'a pointer + 10 =', b + ? 'b pointer := "A" =', c RETURN NIL diff --git a/harbour/tests/procname.prg b/harbour/tests/procname.prg index ce9724ad8b..7cb87ccb38 100644 --- a/harbour/tests/procname.prg +++ b/harbour/tests/procname.prg @@ -33,7 +33,7 @@ FUNCTION Five() LOCAL n := 0 WHILE ! Empty( ProcName( n ) ) - QQOut( "Called from: ", ProcName( n ), ProcLine( n++ ), hb_eol() ) + ?? "Called from: ", ProcName( n ), ProcLine( n++ ), hb_eol() ENDDO RETURN NIL diff --git a/harbour/tests/recursiv.prg b/harbour/tests/recursiv.prg index 6d79b5b76c..2dbabfc5d3 100644 --- a/harbour/tests/recursiv.prg +++ b/harbour/tests/recursiv.prg @@ -6,11 +6,12 @@ PROCEDURE Main() - QOut( "Testing recursive calls" + hb_eol() ) + ? "Testing recursive calls" + ? - QOut( f( 10 ) ) + ? f( 10 ) - QOut( 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 ) + ? 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 RETURN diff --git a/harbour/tests/returns.prg b/harbour/tests/returns.prg index 1fdb4e5f6a..bd7bf6dbe0 100644 --- a/harbour/tests/returns.prg +++ b/harbour/tests/returns.prg @@ -6,15 +6,15 @@ PROCEDURE Main() - QOut( "From Main()" ) + ? "From Main()" Two( 1 ) - QOut( "back to Main()" ) + ? "back to Main()" Two( 2 ) - QOut( "back to Main()" ) + ? "back to Main()" RETURN @@ -22,14 +22,14 @@ FUNCTION Two( n ) DO CASE CASE n == 1 - QOut( "n == 1" ) + ? "n == 1" RETURN NIL CASE n == 2 - QOut( "n == 2" ) + ? "n == 2" RETURN NIL ENDCASE - QOut( "This message should not been seen" ) + ? "This message should not been seen" RETURN NIL diff --git a/harbour/tests/round.prg b/harbour/tests/round.prg index af8dbb3c0d..cf75563944 100644 --- a/harbour/tests/round.prg +++ b/harbour/tests/round.prg @@ -13,12 +13,11 @@ PROCEDURE Main() LOCAL n, value := - 5 FOR n := 1 TO 100 - OutStd( hb_eol() ) - OutStd( value ) - OutStd( Round( value, 3 ) ) - OutStd( Round( value, 2 ) ) - OutStd( Round( value, 1 ) ) - OutStd( Round( value, 0 ) ) + ? value,; + Round( value, 3 ) ,; + Round( value, 2 ) ,; + Round( value, 1 ) ,; + Round( value, 0 ) value += 0.001 NEXT diff --git a/harbour/tests/sdf_test.prg b/harbour/tests/sdf_test.prg index dfa42ec0e9..2cea11e5ef 100644 --- a/harbour/tests/sdf_test.prg +++ b/harbour/tests/sdf_test.prg @@ -29,25 +29,26 @@ PROCEDURE Main() // Try to copy 10 records, starting 5 records from EOF, using WHILE GO BOTTOM - skip -4 + SKIP -4 COPY WHILE ncount++ < 9 TO test4a SDF // Copy the last 10 records. GO BOTTOM - skip -9 + SKIP -9 COPY REST TO test5 SDF // Copy the last 10 records again. GO BOTTOM - skip -9 + SKIP -9 COPY TO test6 SDF WHILE !EOF() // Copy only some of the last 10 records. GO BOTTOM - skip -9 + SKIP -9 COPY REST TO test7 SDF for _field->married // Try to append from a file that we know does not exist. DELETE file test8.txt APPEND FROM test8 SDF - QUIT + + RETURN diff --git a/harbour/tests/seconds.prg b/harbour/tests/seconds.prg index 65d31b84ac..a27bd66018 100644 --- a/harbour/tests/seconds.prg +++ b/harbour/tests/seconds.prg @@ -12,19 +12,18 @@ PROCEDURE Main( cParam ) LOCAL n, limit := 10 + CLS + IF ! Empty( cParam ) limit := Val( cParam ) ENDIF - OutStd( hb_eol() ) - OutStd( Seconds() ) + ? Seconds() FOR n := 1 TO limit IF Empty( cParam ) - OutStd( hb_eol() ) - OutStd( "Pause: " ) + ? "Pause:" Inkey( 0 ) ENDIF - OutStd( hb_eol() ) - OutStd( Seconds() ) + ? Seconds() NEXT RETURN diff --git a/harbour/tests/set_num.prg b/harbour/tests/set_num.prg index 4758d0829d..9c21821333 100644 --- a/harbour/tests/set_num.prg +++ b/harbour/tests/set_num.prg @@ -11,8 +11,7 @@ PROCEDURE Main() LOCAL n FOR n := 1 TO _SET_COUNT - OutStd( hb_eol() ) - OutStd( Set( n ) ) + ? Set( n ) NEXT RETURN diff --git a/harbour/tests/set_test.prg b/harbour/tests/set_test.prg index 942c999d27..462332e473 100644 --- a/harbour/tests/set_test.prg +++ b/harbour/tests/set_test.prg @@ -86,10 +86,8 @@ PROCEDURE Main() PROCEDURE testline( c, n ) - OutStd( hb_eol() ) - OutStd( Str( n, 3 ) ) - OutStd( " " ) - OutStd( PadR( c, 20 ) ) - OutStd( Set( n ) ) + ? Str( n, 3 ) ,; + PadR( c, 20 ) ,; + Set( n ) RETURN diff --git a/harbour/tests/sound.prg b/harbour/tests/sound.prg index 6853337f01..62033cdedd 100644 --- a/harbour/tests/sound.prg +++ b/harbour/tests/sound.prg @@ -6,12 +6,12 @@ PROCEDURE Main() LOCAL start := Seconds(), stop - QOut( "start ", start ) + ? "start ", start Tone( 440, 9.1 ) Tone( 880, 9.1 ) Tone( 440, 9.1 ) stop := Seconds() - QOut( "stop ", stop ) - QOut( "duration", ( stop - start ), "(should be close to 1.5)" ) + ? "stop ", stop + ? "duration", ( stop - start ), "(should be close to 1.5)" RETURN diff --git a/harbour/tests/statfun.prg b/harbour/tests/statfun.prg index a839792d2f..fa43d8e446 100644 --- a/harbour/tests/statfun.prg +++ b/harbour/tests/statfun.prg @@ -6,16 +6,16 @@ PROCEDURE Main() - QOut( "From Main()" ) + ? "From Main()" SecondOne() - QOut( "From Main() again" ) + ? "From Main() again" RETURN STATIC FUNCTION SecondOne() - QOut( "From Second()" ) + ? "From Second()" RETURN NIL diff --git a/harbour/tests/statics.prg b/harbour/tests/statics.prg index 3ae55f9d3a..0167a58729 100644 --- a/harbour/tests/statics.prg +++ b/harbour/tests/statics.prg @@ -12,12 +12,12 @@ PROCEDURE Main() STATIC a := "Hello", b := { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } - QOut( a ) - QOut( b[ 2 ] ) + ? a + ? b[ 2 ] Two() - QOut( "Ok!" ) + ? "Ok!" FOR i := 1 TO 10 NumStat() @@ -25,7 +25,7 @@ PROCEDURE Main() cb := DetachVar( 10 ) FOR i := 1 TO 10 - QOut( Eval( cb, b[ i ] ) ) + ? Eval( cb, b[ i ] ) NEXT RETURN @@ -34,13 +34,13 @@ FUNCTION Two() STATIC a := "Test" - QOut( a ) + ? a RETURN NIL FUNCTION THREE( p ) - QOut( p ) + ? p RETURN p @@ -56,8 +56,8 @@ PROCEDURE NumStat( a ) HB_SYMBOL_UNUSED( a ) cb := {| x | s_z + Str( x ) } - QOut( ++s_n ) - QOut( Eval( cb, s_n ) ) + ? ++s_n + ? Eval( cb, s_n ) RETURN diff --git a/harbour/tests/statics1.prg b/harbour/tests/statics1.prg index d26f54e3d5..78d5647aa3 100644 --- a/harbour/tests/statics1.prg +++ b/harbour/tests/statics1.prg @@ -10,22 +10,22 @@ STATIC uOne, uTwo PROCEDURE Main() - QOut( "Statics overlapped!" ) - QOut( "===================" ) - QOut( "" ) - QOut( "INSIDE statics1.prg" ) - QOut( " static uOne, uTwo" ) - QOut( "" ) - QOut( " uOne, uTwo =>", uOne, ",", uTwo ) + ? "Statics overlapped!" + ? "===================" + ? + ? "INSIDE statics1.prg" + ? " static uOne, uTwo" + ? + ? " uOne, uTwo =>", uOne, ",", uTwo uOne := 1 uTwo := 2 - QOut( " uOne := 1" ) - QOut( " uOne := 2" ) - QOut( " uOne, uTwo =>", uOne, ",", uTwo ) - QOut( "" ) + ? " uOne := 1" + ? " uOne := 2" + ? " uOne, uTwo =>", uOne, ",", uTwo + ? Test() - QOut( "INSIDE statics1.prg" ) - QOut( " uOne, uTwo =>", uOne, ",", uTwo ) - QOut( "" ) + ? "INSIDE statics1.prg" + ? " uOne, uTwo =>", uOne, ",", uTwo + ? RETURN diff --git a/harbour/tests/statics2.prg b/harbour/tests/statics2.prg index 485ca5cc3a..b983f0fac8 100644 --- a/harbour/tests/statics2.prg +++ b/harbour/tests/statics2.prg @@ -10,16 +10,16 @@ STATIC uA, uB PROCEDURE Test() - QOut( "INSIDE statics2.prg" ) - QOut( " static uA, uB" ) - QOut( "" ) - QOut( " ValType( uA ), ValType( uB ) =>", ValType( uA ), ",", ValType( uB ) ) - QOut( " uA, uB =>", uA, ",", uB ) + ? "INSIDE statics2.prg" + ? " static uA, uB" + ? + ? " ValType( uA ), ValType( uB ) =>", ValType( uA ), ",", ValType( uB ) + ? " uA, uB =>", uA, ",", uB uA := "a" uB := "b" - QOut( ' uA := "a"' ) - QOut( ' uB := "b"' ) - QOut( " uA, uB =>", uA, ",", uB ) - QOut( "" ) + ? ' uA := "a"' + ? ' uB := "b"' + ? " uA, uB =>", uA, ",", uB + ? RETURN diff --git a/harbour/tests/strdelim.prg b/harbour/tests/strdelim.prg index b258e4a1cf..f5326f4a37 100644 --- a/harbour/tests/strdelim.prg +++ b/harbour/tests/strdelim.prg @@ -8,12 +8,12 @@ PROCEDURE Main() aArray[ 1 /*first*/ ][ 1 /* second */ ] := [Hello] - QOut( aArray[ 1 ][ 1 ] ) + ? aArray[ 1 ][ 1 ] - QOut( 'World "Peace[!]"' ) + ? 'World "Peace[!]"' - QOut( "Harbour 'Power[!]'" ) + ? "Harbour 'Power[!]'" - QOut( [King 'Clipper "!"'] ) + ? [King 'Clipper "!"'] RETURN diff --git a/harbour/tests/stripem.prg b/harbour/tests/stripem.prg index cd0efdde45..78dd54caff 100644 --- a/harbour/tests/stripem.prg +++ b/harbour/tests/stripem.prg @@ -34,10 +34,10 @@ PROCEDURE Main( cFrom, cTo ) cTo := Default( cTo, "strip.out" ) oFrom := TTextFile() - // Debug( __objGetMethodList( oFrom ) ) +// Debug( __objGetMethodList( oFrom ) ) oFrom:New( cFrom, "R" ) oTo := TTextFile() - // Debug( __objGetMethodList( oTo ) ) +// Debug( __objGetMethodList( oTo ) ) oTo:New( cTo , "W" ) DO WHILE !oFrom:EOF() @@ -46,7 +46,7 @@ PROCEDURE Main( cFrom, cTo ) oTo:Run( cOut ) ENDIF ENDDO - QOut( "Number of lines", oTo:nLine ) + ? "Number of lines", oTo:nLine oFrom:Dispose() oTo:Dispose() @@ -113,13 +113,13 @@ FUNCTION New( cFileName, cMode, nBlock ) ELSEIF ::cMode == "W" ::hFile := FCreate( cFileName ) ELSE - QOut( "DosFile Init: Unknown file mode:", ::cMode ) + ? "DosFile Init: Unknown file mode:", ::cMode ENDIF ::nError := FError() IF ::nError != 0 ::lEoF := .T. - QOut( "Error ", ::nError ) + ? "Error ", ::nError ENDIF ::nBlockSize := Default( nBlock, 4096 ) @@ -140,7 +140,7 @@ FUNCTION Dispose() ENDIF IF !FClose( ::hFile ) ::nError := FError() - QOut( "Dos Error closing ", ::cFileName, " Code ", ::nError ) + ? "Dos Error closing ", ::cFileName, " Code ", ::nError ENDIF ENDIF @@ -159,9 +159,9 @@ FUNCTION READ() LOCAL nEoFPos IF ::hFile == - 1 - QOut( "DosFile:Read : No file open" ) + ? "DosFile:Read : No file open" ELSEIF ::cMode != "R" - QOut( "File ", ::cFileName, " not open for reading" ) + ? "File ", ::cFileName, " not open for reading" ELSEIF !::lEoF IF Len( ::cBlock ) == 0 // Read new block @@ -213,9 +213,9 @@ FUNCTION WriteLn( xTxt, lCRLF ) LOCAL cBlock IF ::hFile == - 1 - QOut( "DosFile:Write : No file open" ) + ? "DosFile:Write : No file open" ELSEIF !( ::cMode == "W" ) - QOut( "File ", ::cFileName, " not opened for writing" ) + ? "File ", ::cFileName, " not opened for writing" ELSE cBlock := ToChar( xTxt ) // Convert to string IF DEFAULT( lCRLF, .T. ) @@ -240,9 +240,9 @@ FUNCTION GOTO( nLine ) LOCAL nWhere := 1 IF Empty( ::hFile ) - QOut( "DosFile:Goto : No file open" ) + ? "DosFile:Goto : No file open" ELSEIF !( ::cMode == "R" ) - QOut( "File ", ::cFileName, " not open for reading" ) + ? "File ", ::cFileName, " not open for reading" ELSE ::lEoF := .F. // Clear (old) End of file ::nLine := 0 // Start at beginning diff --git a/harbour/tests/t1.prg b/harbour/tests/t1.prg index a353705305..74168bc178 100644 --- a/harbour/tests/t1.prg +++ b/harbour/tests/t1.prg @@ -10,7 +10,7 @@ PROCEDURE Main() LOCAL cb := {|| QOut( "test" ) } WHILE i < 1000 - QOut( i ) + ? i Eval( cb ) i++ END diff --git a/harbour/tests/test.prg b/harbour/tests/test.prg index 6d1d8dbea7..ee4c42977e 100644 --- a/harbour/tests/test.prg +++ b/harbour/tests/test.prg @@ -7,17 +7,17 @@ PROCEDURE Main() LOCAL s := " " + Chr( 0 ) + " mab " + Chr( 0 ) + " " StrDump( s ) - QOut( s ) + ? s - QOut( '"' + LTrim( s ) + '"' ) - QOut( '"' + RTrim( s ) + '"' ) - QOut( '"' + AllTrim( s ) + '"' ) + ? '"' + LTrim( s ) + '"' + ? '"' + RTrim( s ) + '"' + ? '"' + AllTrim( s ) + '"' RETURN STATIC PROCEDURE StrDump( s ) LOCAL tmp FOR EACH tmp IN s - QOut( Asc( tmp ) ) + ? Asc( tmp ) NEXT RETURN diff --git a/harbour/tests/testerro.prg b/harbour/tests/testerro.prg index 5f1570c971..1b04ff0c8b 100644 --- a/harbour/tests/testerro.prg +++ b/harbour/tests/testerro.prg @@ -8,7 +8,7 @@ PROCEDURE Main() LOCAL n - QOut( "We are running and now an error will raise" ) + ? "We are running and now an error will raise" n++ // an error should raise here diff --git a/harbour/tests/testfor.prg b/harbour/tests/testfor.prg index 5f5508de9d..31a6b10d7e 100644 --- a/harbour/tests/testfor.prg +++ b/harbour/tests/testfor.prg @@ -8,13 +8,13 @@ PROCEDURE Main() FOR i := 1 TO 10 - QOut( i ) + ? i IF i == 4 .AND. .T. __Accept( "" ) - QOut( i ) + ? i i := 9 - QOut( i ) + ? i __Accept( "" ) ENDIF diff --git a/harbour/tests/testget.prg b/harbour/tests/testget.prg index 3fdd84f5e5..5b6687b284 100644 --- a/harbour/tests/testget.prg +++ b/harbour/tests/testget.prg @@ -16,7 +16,7 @@ PROCEDURE Main() @ 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 ] +// @ 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 @@ -26,12 +26,12 @@ PROCEDURE Main() CLS - /* Clipper Error "Get contains complex macro" +/* Clipper Error "Get contains complex macro" ? "This GET should say 'Late!'." cMacro := "cEarly" - @ 10,10 SAY "cMacro :" GET &(cMacro) + @ 10, 10 SAY "cMacro :" GET &( cMacro ) cMacro := "cLate" READ - */ +*/ RETURN diff --git a/harbour/tests/testhtml.prg b/harbour/tests/testhtml.prg index aa31ecf313..f80655a227 100644 --- a/harbour/tests/testhtml.prg +++ b/harbour/tests/testhtml.prg @@ -35,8 +35,6 @@ PROCEDURE Main() RETURN -/*---------------------------------------------------------------------------*/ - FUNCTION THTML() STATIC oClass diff --git a/harbour/tests/testid.prg b/harbour/tests/testid.prg index bed8f5de3c..8bafac0c0b 100644 --- a/harbour/tests/testid.prg +++ b/harbour/tests/testid.prg @@ -12,33 +12,33 @@ PROCEDURE Main() - QOut( "testing Harbour /d compiler flag" ) + ? "testing Harbour /d compiler flag" #ifdef TEST - QOut( "Fine, you have just tested the /d compiler flag" ) + ? "Fine, you have just tested the /d compiler flag" #else - QOut( "Please use /dTEST compiler flag" ) - QOut( "Or run 'set HB_USER_PRGFLAGS=/dTEST' if you are using the GNU Make System" ) + ? "Please use /dTEST compiler flag" + ? "Or run 'set HB_USER_PRGFLAGS=/dTEST' if you are using the GNU Make System" #endif #ifdef FIRST - QOut( "FIRST is defined" ) + ? "FIRST is defined" #ifdef SECOND - QOut( "FIRST and SECOND are defined" ) + ? "FIRST and SECOND are defined" #ifdef THIRD - QOut( "FIRST, SECOND and THIRD are defined" ) + ? "FIRST, SECOND and THIRD are defined" #else - QOut( "THIRD is not defined" ) + ? "THIRD is not defined" #endif #else - QOut( "SECOND is not defined" ) + ? "SECOND is not defined" #endif #else - QOut( "FIRST is not defined" ) + ? "FIRST is not defined" #endif RETURN diff --git a/harbour/tests/testop.prg b/harbour/tests/testop.prg index 86875da065..a0151cd371 100644 --- a/harbour/tests/testop.prg +++ b/harbour/tests/testop.prg @@ -57,7 +57,7 @@ // of them. -//----------------------------------------------------------------------------// +// PROCEDURE Main() @@ -70,7 +70,7 @@ PROCEDURE Main() RETURN -//----------------------------------------------------------------------------// +// CREATE CLASS TCar @@ -84,7 +84,7 @@ CREATE CLASS TCar ENDCLASS -//----------------------------------------------------------------------------// +// METHOD New( cColor, nDoors ) CLASS TCar @@ -100,7 +100,7 @@ METHOD New( cColor, nDoors ) CLASS TCar RETURN Self -//----------------------------------------------------------------------------// +// METHOD SUM( oObject ) CLASS TCar @@ -111,4 +111,4 @@ METHOD SUM( oObject ) CLASS TCar RETURN NIL -//----------------------------------------------------------------------------// +// diff --git a/harbour/tests/teststr.prg b/harbour/tests/teststr.prg index e65268ad26..644112b394 100644 --- a/harbour/tests/teststr.prg +++ b/harbour/tests/teststr.prg @@ -4,14 +4,12 @@ PROCEDURE Main() - OutStd( hb_eol() ) - OutStd( "Running with SET FIXED OFF (the default setting): " ) - OutStd( hb_eol() ) + ? "Running with SET FIXED OFF (the default setting):" + ? test() __ACCEPT( "Pause before running again with SET FIXED ON: " ) - OutStd( hb_eol() ) - OutStd( "Running with SET FIXED ON: " ) - OutStd( hb_eol() ) + ? "Running with SET FIXED ON:" + ? Set( _SET_FIXED, "ON" ) test() @@ -23,96 +21,100 @@ PROCEDURE test() LOCAL b := 10.0002575 LOCAL nI, c, d - OutStd( "1: " ) - OutStd( 10 ) - OutStd( a ) - OutStd( - a ) - OutStd( b ) - OutStd( - b ) - OutStd( hb_eol() ) - OutStd( "2: " ) - OutStd( a + b ) - OutStd( a - b ) - OutStd( a * b ) - OutStd( a / b ) - OutStd( hb_eol() ) - OutStd( "3: " ) - OutStd( a % b ) - OutStd( a ** b ) - OutStd( hb_eol() ) + ?? "1: " + ?? 10 + ?? a + ?? -a + ?? b + ?? -b + ? + + ?? "2: " + ?? a + b + ?? a - b + ?? a * b + ?? a / b + ? + + ?? "3: " + ?? a % b + ?? a ** b + ? c := a * b d := b * a - OutStd( hb_eol() ) - OutStd( "4: " ) - OutStd( Str( c ) ) - OutStd( Str( d ) ) - OutStd( hb_eol() ) - OutStd( "5: " ) - OutStd( Str( c + d ) ) - OutStd( Str( c - d ) ) - OutStd( Str( c * d ) ) - OutStd( Str( c / d ) ) - OutStd( hb_eol() ) + ? - OutStd( hb_eol() ) - OutStd( "6: " ) - OutStd( a + b + c ) - OutStd( c - b - a ) - OutStd( b * a * c ) - OutStd( b * a * c * d ) + ?? "4: " + ?? Str( c ) + ?? Str( d ) + ? + + ?? "5: " + ?? Str( c + d ) + ?? Str( c - d ) + ?? Str( c * d ) + ?? Str( c / d ) + ? + + ? + ?? "6: " + ?? a + b + c + ?? c - b - a + ?? b * a * c + ?? b * a * c * d b := 1.000213 - OutStd( b * b * b * b * b * b * b ) - OutStd( hb_eol() ) + ?? b * b * b * b * b * b * b + ? FOR nI := 1 TO 20 - OutStd( hb_eol() ) - OutStd( LTrim( Str( 6 + nI ) ) + ": " ) - OutStd( 10 ** nI + ( 1.02 * 1.02 ) ) + ? + ?? LTrim( Str( 6 + nI ) ) + ": " + ?? 10 ** nI + ( 1.02 * 1.02 ) NEXT - OutStd( hb_eol() ) + ? - OutStd( hb_eol() ) - OutStd( "27: " ) - OutStd( Str( a ), a ) - OutStd( hb_eol() ) + ? + ?? "27: " + ?? Str( a ), a + ? - OutStd( "28: " ) - OutStd( Str( b ), b ) - OutStd( hb_eol() ) + ?? "28: " + ?? Str( b ), b + ? - OutStd( "29: " ) - OutStd( Str( b, 15 ) ) - OutStd( hb_eol() ) + ?? "29: " + ?? Str( b, 15 ) + ? - OutStd( "30: " ) - OutStd( Str( b, 20, 5 ) ) - OutStd( hb_eol() ) + ?? "30: " + ?? Str( b, 20, 5 ) + ? - OutStd( "31: " ) - OutStd( Str( b, 20, 10 ) ) - OutStd( hb_eol() ) + ?? "31: " + ?? Str( b, 20, 10 ) + ? - OutStd( "32: " ) - OutStd( Str( b, 5, 10 ) ) - OutStd( hb_eol() ) + ?? "32: " + ?? Str( b, 5, 10 ) + ? - OutStd( "33: " ) - OutStd( Str( b, 20, - 10 ) ) - OutStd( hb_eol() ) + ?? "33: " + ?? Str( b, 20, - 10 ) + ? - OutStd( "34: " ) - OutStd( Str( b, - 12, 7 ) ) - OutStd( hb_eol() ) + ?? "34: " + ?? Str( b, - 12, 7 ) + ? - OutStd( "35: " ) - OutStd( Str( b, 0 ) ) - OutStd( hb_eol() ) + ?? "35: " + ?? Str( b, 0 ) + ? - OutStd( hb_eol() ) + ? a := 15.1004 - OutStd( "36: " ) - OutStd( Str( a ), a ) - OutStd( hb_eol() ) + ?? "36: " + ?? Str( a ), a + ? RETURN diff --git a/harbour/tests/testtok.prg b/harbour/tests/testtok.prg index f434bd1404..fbcccc9331 100644 --- a/harbour/tests/testtok.prg +++ b/harbour/tests/testtok.prg @@ -13,7 +13,7 @@ PROCEDURE Main() a := strtoarray( "this is a great big test of strtoken" ) FOR i := 1 TO Len( a ) - QOut( a[ i ] ) + ? a[ i ] ) NEXT RETURN @@ -28,7 +28,7 @@ FUNCTION strtoarray( s ) AAdd( aResult, t ) s := SubStr( s, l + 2 ) /* skip the delimiter */ - QOut( t, Str( l ), s ) + ? t, Str( l ), s ) ENDDO RETURN aResult diff --git a/harbour/tests/testvars.prg b/harbour/tests/testvars.prg index d36c9e43c0..f1c0eeeb5e 100644 --- a/harbour/tests/testvars.prg +++ b/harbour/tests/testvars.prg @@ -13,7 +13,7 @@ PROCEDURE Main( Param1 ) Sub( @j ) - QOut( j ) + ? j HB_SYMBOL_UNUSED( Param1 ) HB_SYMBOL_UNUSED( k ) diff --git a/harbour/tests/tflock.prg b/harbour/tests/tflock.prg index d0aa9cdf97..96293e1e3d 100644 --- a/harbour/tests/tflock.prg +++ b/harbour/tests/tflock.prg @@ -7,10 +7,6 @@ #include "fileio.ch" #include "inkey.ch" -#define READ_ACCESS 0 -#define WRITE_ACCESS 1 -#define READ_WRITE_ACCESS 2 - #define FLX_EXCLUSIVE 0x0000 /* Exclusive lock */ #define FLX_SHARED 0x0100 /* Shared lock */ #define FLX_NO_WAIT 0x0000 /* Immediate return */ @@ -31,55 +27,61 @@ PROCEDURE Main() LOCAL nKeyHit LOCAL nLockType - QOut( "Opening lock file" ) - IF ( hLockFile := FOpen( "emphasis.6lo", READ_WRITE_ACCESS ) ) == F_ERROR - QOut( "ERROR: Cannot open Lock File" ) + CLS + + IF ! hb_FileExists( "emphasis.6lo" ) + hb_MemoWrit( "emphasis.6lo", "" ) + ENDIF + + ? "Opening lock file" + IF ( hLockFile := FOpen( "emphasis.6lo", FO_READWRITE ) ) == F_ERROR + ? "ERROR: Cannot open Lock File" RETURN ENDIF - QOut( "Lock file opened - handle is", hb_ntos( hLockFile ) ) - QOut() + ? "Lock file opened - handle is", hb_ntos( hLockFile ) + ? s_lLocked := .F. s_lExclusive := .T. s_lBlocking := .F. nExclusivity := FLX_EXCLUSIVE nBlocking := FLX_NO_WAIT ShowStatus() - QOut( "[+] to get a lock, [-] to release it, [Esc] to exit, [E] for exclusive, [S] for shared, [B] for blocking, [N] for non-blocking" ) + ? "[+] to get a lock, [-] to release it, [Esc] to exit, [E] for exclusive, [S] for shared, [B] for blocking, [N] for non-blocking" DO WHILE .T. nKeyHit := Inkey( 0 ) SWITCH nKeyHit CASE hb_keyCode( "+" ) IF s_lLocked - QOut( "Already locked" ) + ? "Already locked" ELSE nLockType := nExclusivity + nBlocking - QOut( "Requesting Lock" ) + ? "Requesting Lock" lSuccess := hb_FLock( hLockFile, 0, 1, nLockType ) IF lSuccess - QOut( "Lock has been obtained" ) + ? "Lock has been obtained" s_lLocked := .T. ELSE - QOut( "Lock Request Failed - Error Code:", FError() ) + ? "Lock Request Failed - Error Code:", FError() ENDIF ENDIF EXIT CASE hb_keyCode( "-" ) IF ! s_lLocked - QOut( "Lock not currently held" ) + ? "Lock not currently held" ELSE lSuccess := hb_FUnlock( hLockFile, 0, 1 ) IF lSuccess - QOut( "Lock has been released" ) + ? "Lock has been released" s_lLocked := .F. ELSE - QOut( "Unlock Request Failed - Error Code:", FError() ) + ? "Unlock Request Failed - Error Code:", FError() ENDIF ENDIF EXIT CASE hb_keyCode( "E" ) CASE hb_keyCode( "e" ) IF s_lLocked - QOut( "Release Lock before changing lock type" ) + ? "Release Lock before changing lock type" ELSE s_lExclusive := .T. nExclusivity := FLX_EXCLUSIVE @@ -89,7 +91,7 @@ PROCEDURE Main() CASE hb_keyCode( "S" ) CASE hb_keyCode( "s" ) IF s_lLocked - QOut( "Release Lock before changing lock type" ) + ? "Release Lock before changing lock type" ELSE s_lExclusive := .F. nExclusivity := FLX_SHARED @@ -99,7 +101,7 @@ PROCEDURE Main() CASE hb_keyCode( "B" ) CASE hb_keyCode( "b" ) IF s_lLocked - QOut( "Release Lock before changing function mode" ) + ? "Release Lock before changing function mode" ELSE s_lBlocking := .T. nExclusivity := FLX_WAIT @@ -109,7 +111,7 @@ PROCEDURE Main() CASE hb_keyCode( "N" ) CASE hb_keyCode( "n" ) IF s_lLocked - QOut( "Release Lock before changing function mode" ) + ? "Release Lock before changing function mode" ELSE s_lBlocking := .F. nExclusivity := FLX_NO_WAIT @@ -117,12 +119,12 @@ PROCEDURE Main() ENDIF EXIT CASE K_ESC - QOut() + ? FClose( hLockFile ) - QOut( "Exiting" ) + ? "Exiting" RETURN OTHERWISE - QOut( "Key not supported", nKeyHit ) + ? "Key not supported", nKeyHit ENDSWITCH ENDDO @@ -130,8 +132,8 @@ PROCEDURE Main() PROCEDURE ShowStatus() - QOut( "Lock: " + iif( s_lLocked, "Held", "Released" ) +; + ? "Lock: " + iif( s_lLocked, "Held", "Released" ) +; " Type: " + iif( s_lExclusive, "Exclusive", "Shared" ) +; - " Request is: " + iif( s_lBlocking, "Blocking", "Non-Blocking" ) ) + " Request is: " + iif( s_lBlocking, "Blocking", "Non-Blocking" ) RETURN diff --git a/harbour/tests/tstalias.prg b/harbour/tests/tstalias.prg index 8d6fcf093c..612e504619 100644 --- a/harbour/tests/tstalias.prg +++ b/harbour/tests/tstalias.prg @@ -9,11 +9,11 @@ PROCEDURE Main() REPLACE Age WITH 1 ? FIELD->Age - //REPLACE 1->Age WITH 2 // Todo: complete support in harbour.y - AliasAddInt() - //? FIELD->Age +// REPLACE 1->Age WITH 2 // Todo: complete support in harbour.y - AliasAddInt() +// ? FIELD->Age - //REPLACE 1.5->Age WITH 3 // Will produce "Invalid alias expression" - //? FIELD->Age +// REPLACE 1.5->Age WITH 3 // Will produce "Invalid alias expression" +// ? FIELD->Age REPLACE TEST->Age WITH 4 ? FIELD->Age @@ -30,7 +30,7 @@ PROCEDURE Main() USE test - // ? ("0")->FIRST +// ? ( "0" )->FIRST ? ( "B" )->FIRST ? ( "2" )->FIRST ? 2->FIRST @@ -38,7 +38,7 @@ PROCEDURE Main() Inkey( 0 ) - // ? ("0")->FIRST +// ? ( "0" )->FIRST ? Select() ? Select( 1 ) ? Select( 2 ) diff --git a/harbour/tests/version.prg b/harbour/tests/version.prg index 5cac91eb1b..6321d77287 100644 --- a/harbour/tests/version.prg +++ b/harbour/tests/version.prg @@ -11,8 +11,8 @@ PROCEDURE Main() - OutStd( Chr( 34 ) + Version() + Chr( 34 ) + hb_eol() ) - OutStd( Chr( 34 ) + hb_compiler() + Chr( 34 ) + hb_eol() ) - OutStd( Chr( 34 ) + OS() + Chr( 34 ) + hb_eol() ) + ? Chr( 34 ) + Version() + Chr( 34 ) + ? Chr( 34 ) + hb_compiler() + Chr( 34 ) + ? Chr( 34 ) + OS() + Chr( 34 ) RETURN diff --git a/harbour/tests/videotst.prg b/harbour/tests/videotst.prg index 48b383c0e4..045f0eed22 100644 --- a/harbour/tests/videotst.prg +++ b/harbour/tests/videotst.prg @@ -53,8 +53,6 @@ PROCEDURE Main() ENDDO - QUIT - RETURN //************************* diff --git a/harbour/tests/while.prg b/harbour/tests/while.prg index 14b2689e63..7f25d91ed2 100644 --- a/harbour/tests/while.prg +++ b/harbour/tests/while.prg @@ -9,7 +9,7 @@ PROCEDURE Main() LOCAL x := 0 DO WHILE x++ < 1000 - QOut( x ) + ? x ENDDO RETURN diff --git a/harbour/tests/wvtext.prg b/harbour/tests/wvtext.prg index 7706f2c042..4c40c062fc 100644 --- a/harbour/tests/wvtext.prg +++ b/harbour/tests/wvtext.prg @@ -2,17 +2,8 @@ * $Id$ */ -//----------------------------------------------------------------------// -//----------------------------------------------------------------------// -//----------------------------------------------------------------------// -// -// Harbour Extended Features Demo -// . -// Pritpal Bedi -// -//----------------------------------------------------------------------// -//----------------------------------------------------------------------// -//----------------------------------------------------------------------// +// Harbour Extended Features Demo +// Pritpal Bedi #include "hbgtinfo.ch" #include "inkey.ch" @@ -20,13 +11,13 @@ #define RGB( r, g, b ) ( r + ( g * 256 ) + ( b * 256 * 256 ) ) -//----------------------------------------------------------------------// +// STATIC s_nRows := 20 STATIC s_nCols := 60 STATIC s_nColorIndex := 1 -//----------------------------------------------------------------------// +// PROCEDURE Main() @@ -290,7 +281,7 @@ PROCEDURE Main() RETURN -//-------------------------------------------------------------------// +// STATIC PROCEDURE DispScreen() @@ -337,7 +328,7 @@ STATIC PROCEDURE DispScreen() RETURN -//-------------------------------------------------------------------// +// PROCEDURE HB_GTSYS() @@ -346,7 +337,7 @@ PROCEDURE HB_GTSYS() RETURN -//-------------------------------------------------------------------// +// FUNCTION SetPalette( nMode ) @@ -369,7 +360,7 @@ FUNCTION SetPalette( nMode ) RETURN NIL -//-------------------------------------------------------------------// +// FUNCTION SetPaletteIndex() @@ -378,7 +369,7 @@ FUNCTION SetPaletteIndex() RETURN NIL -//-------------------------------------------------------------------// +// PROCEDURE thFunc() @@ -471,7 +462,7 @@ PROCEDURE thFunc() RETURN -//-------------------------------------------------------------------// +// STATIC FUNCTION DbSkipBlock( n, oTbr ) @@ -492,7 +483,7 @@ STATIC FUNCTION DbSkipBlock( n, oTbr ) RETURN nSkipped -//-------------------------------------------------------------------// +// STATIC FUNCTION TBNext( oTbr ) @@ -513,7 +504,7 @@ STATIC FUNCTION TBNext( oTbr ) RETURN lMoved -//-------------------------------------------------------------------// +// STATIC FUNCTION TBPrev( oTbr ) @@ -531,13 +522,13 @@ STATIC FUNCTION TBPrev( oTbr ) RETURN lMoved -//-------------------------------------------------------------------// +// STATIC FUNCTION BlockField( i ) RETURN {|| FieldGet( i ) } -//-------------------------------------------------------------------// +// STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd ) @@ -567,7 +558,7 @@ STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd ) RETURN lRet -//-------------------------------------------------------------------// +// FUNCTION ChgPalette( lFocus )