Files
harbour-core/harbour/tests/extend1.prg
Viktor Szakats 7d17a485e2 2012-10-15 12:20 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbformat/hbfmtcls.prg
    * new TOFIX:
        ".T.," / ".F.," gets wrongly corrected to ".T. ," / ".F. ,"

  * contrib/hbct/tests/atrepl.prg
  * contrib/hbct/tests/ctwtest.prg
  * contrib/hbct/tests/datetime.prg
  * contrib/hbgd/gdbar.prg
  * contrib/hbgd/gdbarcod.prg
  * contrib/hbgd/tests/barms.prg
  * contrib/hbgd/tests/bartest.prg
  * contrib/hbgd/tests/gdtestcl.prg
  * contrib/hbgd/tests/test_out.prg
  * contrib/hbhpdf/tests/harupdf.prg
  * contrib/hbmisc/fcomma.prg
  * contrib/hbnf/calendar.prg
  * contrib/hbnf/dispmsg.prg
  * contrib/hbnf/floptst.prg
  * contrib/hbnf/ftround.prg
  * contrib/hbnf/mouse1.prg
  * contrib/hbnf/pegs.prg
  * contrib/hbnf/popadder.prg
  * contrib/hbnf/tempfile.prg
  * contrib/hbnf/tests/aading.prg
  * contrib/hbnf/tests/calendar.prg
  * contrib/hbnf/tests/clrsel.prg
  * contrib/hbnf/tests/dispmsg.prg
  * contrib/hbnf/tests/findith.prg
  * contrib/hbnf/tests/menu1.prg
  * contrib/hbnf/tests/tbwhile.prg
  * contrib/hbnf/tests/vertmenu.prg
  * contrib/hbsqlit3/tests/authoriz.prg
  * contrib/hbsqlit3/tests/backup.prg
  * contrib/hbsqlit3/tests/hooks.prg
  * contrib/hbsqlit3/tests/metadata.prg
  * contrib/hbsqlit3/tests/pack.prg
  * contrib/hbsqlit3/tests/sl3_test.prg
  * contrib/hbtip/sendmail.prg
  * contrib/hbtip/tests/base64.prg
  * contrib/hbtip/tests/httpadv.prg
  * contrib/hbtip/thtml.prg
  * contrib/hbtpathy/telepath.prg
  * contrib/hbwin/tests/testole.prg
  * contrib/rddads/tests/datad.prg
  * contrib/rddads/tests/testmg.prg
  * contrib/rddsql/tests/arrayrdd.prg
  * contrib/sddmy/tests/test1.prg
  * contrib/sddoci/tests/test1.prg
  * contrib/sddodbc/tests/test1.prg
  * contrib/sddodbc/tests/test2.prg
  * contrib/sddsqlt3/tests/test1.prg
  * contrib/xhb/dumpvar.prg
  * contrib/xhb/hblog.prg
  * contrib/xhb/trpc.prg
  * contrib/xhb/trpccli.prg
  * contrib/xhb/ttable.prg
  * contrib/xhb/xcstr.prg
  * contrib/xhb/xhberr.prg
  * contrib/xhb/xhbtedit.prg
  * extras/gtwvw/tests/cbtest6.prg
  * extras/gtwvw/tests/drawimg.prg
  * extras/gtwvw/tests/ebtest7.prg
  * extras/gtwvw/tests/maximize.prg
  * extras/gtwvw/tests/prog0.prg
  * extras/gtwvw/tests/prog1.prg
  * extras/gtwvw/tests/prog2.prg
  * extras/gtwvw/tests/wvwtest9.prg
  * extras/hbvpdf/hbvpdf.prg
  * extras/hbvpdf/tests/pdf_demo.prg
  * extras/httpsrv/modules/info.prg
  * extras/httpsrv/modules/showcounter.prg
  * tests/ac_test2.prg
  * tests/adirtest.prg
  * tests/and_or.prg
  * tests/brwpos.prg
  * tests/clasname.prg
  * tests/extend1.prg
  * tests/newrdd.prg
  * tests/testbrw.prg
  * tests/testcdx.prg
  * tests/testdbf.prg
  * tests/transtst.prg
  * tests/tstasort.prg
  * tests/usrrdd/exarr.prg
  * tests/usrrdd/exhsx.prg
    * formatting (mostly fixing one formatting error by hbformat)
2012-10-15 10:24:57 +00:00

283 lines
6.4 KiB
Plaintext

/*
* $Id$
*/
// Testing Harbour Extended system.
//
// NOTE: compile extend1.prg and extend2.c and link both files
PROCEDURE Main()
LOCAL uVar
SET CENTURY ON
? "Testing Harbour Extended system:"
? "================================"
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
__Accept( "Press return to continue..." )
? "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"
? ' uVar := "Hello word"'
Strings5( @uVar, "Harbour power!!!" )
? ' _storc() with Strings5( @uVar, "Harbour power!!!" ) => ', uVar
Strings6( @uVar, "Harbour power!!!", 7 )
? ' _storclen() with Strings6( @uVar, "Harbour power!!!", 7 ) => ', uVar
uVar := { "Hello word" }
? ' uVar := { "Hello word" }'
Strings7( uVar, "Harbour power!!!" )
? ' _storc() with Strings7( uVar, "Harbour power!!!" ) => ', uVar[ 1 ]
Strings8( uVar, "Harbour power!!!", 7 )
? ' _storclen() with Strings8( uVar, "Harbour power!!!", 7 ) => ', uVar[ 1 ]
?
?
?
?
?
?
?
?
?
?
?
__Accept( "Press return to continue..." )
? "Logicals:"
? "========="
?
? ' _parl() and _retl() with Logical1( .T. ) =>', Logical1( .T. )
? ' _parl() and _parl() with Logical2( { .T. } ) =>', Logical2( { .T. } )
uVar := .T.
? ' uVar := .T.'
Logical3( @uVar, .F. )
? ' _storl() with Logical3( @uVar, .F. ) => ', uVar
uVar := { .T. }
? ' uVar := { .T. }'
Logical4( uVar, .F. )
? ' _storl() with Logical4( uVar, .F. ) => ', uVar[ 1 ]
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
__Accept( "Press return to continue..." )
? "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" )
? ' uVar := CToD( "01/01/2000" )'
Date3( @uVar, CToD( "12/31/1999" ) )
? ' _stords() with Date3( @uVar, CToD( "12/31/1999" ) ) => ', uVar
uVar := { CToD( "01/01/2000" ) }
? ' uVar := { CToD( "01/01/2000" ) }'
Date4( uVar, CToD( "12/31/1999" ) )
? ' _stords() with Date4( uVar, CToD( "12/31/1999" ) ) => ', uVar[ 1 ]
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
__Accept( "Press return to continue..." )
? "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
? ' uVar := 100'
Int3( @uVar, 200 )
? ' _storni() with Int3( @uVar, 200 ) => ', uVar
uVar := { 100 }
? ' uVar := { 100 }'
Int4( uVar, 200 )
? ' _storni() with Int4( uVar, 200 ) => ', uVar[ 1 ]
uVar := 123456789
? ' uVar := 123456789'
Long3( @uVar, 987654321 )
? ' _stornl() with Long3( @uVar, 987654321 ) => ', uVar
uVar := { 123456789 }
? ' uVar := { 123456789 }'
Long4( uVar, 987654321 )
? ' _stornl() with Long4( uVar, 987654321 ) => ', uVar[ 1 ]
uVar := 1234567.89
? ' uVar := 1234567.89'
Double3( @uVar, 9876543.21 )
? ' _stornd() with Double3( @uVar, 9876543.21 ) => ', uVar
uVar := { 1234567.89 }
? ' uVar := { 1234567.89 }'
Double4( uVar, 9876543.21 )
? ' _stornl() with Double4( uVar, 9876543.21 ) => ', uVar[ 1 ]
?
?
?
__Accept( "Press return to continue..." )
? "Nil:"
? "===="
?
? ' _ret() with Nil1() =>', Nil1()
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
__Accept( "Press return to continue..." )
? "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..." )
? "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..." )
? "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