//
// $Id: extend1.prg 1519 1999-10-04 18:46:41Z vszel $
//

// Testing Harbour Extended system.
//
// NOTE: compile extend1.prg and extend2.c and link both files

function Main()

   local uVar

   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( "" )

   __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" ) )
   uVar := "Hello word"
   QOut( '  uVar := "Hello word"' )
   Strings5( @uVar, "Harbour power!!!" )
   QOut( '  _storc() with Strings5( @uVar, "Harbour power!!!" ) => ', uVar )
   Strings6( @uVar, "Harbour power!!!", 7 )
   QOut( '  _storclen() with Strings6( @uVar, "Harbour power!!!", 7 ) => ', uVar )
   uVar := { "Hello word" }
   QOut( '  uVar := { "Hello word" }' )
   Strings7( uVar, "Harbour power!!!" )
   QOut( '  _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( "" )

   __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. } ) )
   uVar := .T.
   QOut( '  uVar := .T.' )
   Logical3( @uVar, .F. )
   QOut( '  _storl() with Logical3( @uVar, .F. ) => ', uVar )
   uVar := { .T. }
   QOut( '  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( "" )

   __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" ) } ) )
   uVar := CToD( "01/01/2000" )
   QOut( '  uVar := CToD( "01/01/2000" )' )
   Date3( @uVar, CToD( "12/31/1999" ) )
   QOut( '  _stords() with Date3( @uVar, CToD( "12/31/1999" ) ) => ', uVar )
   uVar := { CToD( "01/01/2000" ) }
   QOut( '  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( "" )

   __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 } ) )
   uVar := 100
   QOut( '  uVar := 100' )
   Int3( @uVar, 200 )
   QOut( '  _storni() with Int3( @uVar, 200 ) => ', uVar )
   uVar := { 100 }
   QOut( '  uVar := { 100 }' )
   Int4( uVar, 200 )
   QOut( '  _storni() with Int4( uVar, 200 ) => ', uVar[ 1 ] )
   uVar := 123456789
   QOut( '  uVar := 123456789' )
   Long3( @uVar, 987654321 )
   QOut( '  _stornl() with Long3( @uVar, 987654321 ) => ', uVar )
   uVar := { 123456789 }
   QOut( '  uVar := { 123456789 }' )
   Long4( uVar, 987654321 )
   QOut( '  _stornl() with Long4( uVar, 987654321 ) => ', uVar[ 1 ] )
   uVar := 1234567.89
   QOut( '  uVar := 1234567.89' )
   Double3( @uVar, 9876543.21 )
   QOut( '  _stornd() with Double3( @uVar, 9876543.21 ) => ', uVar )
   uVar := { 1234567.89 }
   QOut( '  uVar := { 1234567.89 }' )
   Double4( uVar, 9876543.21 )
   QOut( '  _stornl() with Double4( uVar, 9876543.21 ) => ', uVar[ 1 ] )
   QOut( "" )
   QOut( "" )
   QOut( "" )

   __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( "" )

   __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( "" )

   __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( "" )

   __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( "" )

return nil
