2012-07-18 15:35 UTC+0200 Viktor Szakats (harbour syenar.net)
* tests/ac_test2.prg
* tests/adirtest.prg
* tests/ainstest.prg
* tests/altdtest.prg
* tests/and_or.prg
* tests/array16.prg
* tests/arrayidx.prg
* tests/arrays.prg
* tests/arreval.prg
* tests/arrindex.prg
* tests/atest.prg
* tests/box.prg
* tests/boxtst2.prg
* tests/byref.prg
* tests/calling.prg
* tests/clasinit.prg
* tests/clasname.prg
* tests/classch.prg
* tests/classes.prg
* tests/clsdata.prg
* tests/cmphello.prg
* tests/codebl.prg
* tests/codebloc.prg
* tests/comments.prg
* tests/curdirt.prg
* tests/db_brows.prg
* tests/dbevalts.prg
* tests/docase.prg
* tests/dosshell.prg
* tests/dupvars.prg
* tests/dynobj.prg
* tests/dynsym.prg
* tests/exittest.prg
* tests/extend1.prg
* tests/exthrb.prg
* tests/fib.prg
* tests/fornext.prg
* tests/fortest.prg
* tests/funcarr.prg
* tests/gfx.prg
* tests/gtchars.prg
* tests/gtcolors.prg
* tests/gtkeys.prg
* tests/hello.prg
* tests/ifelse.prg
* tests/inherit.prg
* tests/inhprob.prg
* tests/inifiles.prg
* tests/initexit.prg
* tests/inline.prg
* tests/iotest.prg
* tests/iotest2.prg
* tests/keywords.prg
* tests/langmsg.prg
* tests/linecont.prg
* tests/lnlenli1.prg
* tests/lnlenli2.prg
* tests/longdev.prg
* tests/longstr.prg
* tests/longstr2.prg
* tests/mathtest.prg
* tests/memfile.prg
* tests/memory.prg
* tests/readhrb.prg
* tests/rto_get.prg
* tests/rto_tb.prg
* tests/scroll.prg
* tests/seconds.prg
* tests/set_test.prg
* tests/speedold.prg
* tests/stripem.prg
* tests/t1.prg
* tests/test_all.prg
* tests/testbrw.prg
* tests/testhtml.prg
* tests/testid.prg
* tests/testpre.prg
* tests/testwarn.prg
* tests/ticktime.prg
* tests/tstchbx.prg
* tests/tstmacro.prg
* tests/tstprag.prg
* tests/vec1.prg
* tests/videotst.prg
* tests/vidtest.prg
* cleaning up tests (roughly complete)
This commit is contained in:
@@ -16,6 +16,94 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-07-18 15:35 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* tests/ac_test2.prg
|
||||
* tests/adirtest.prg
|
||||
* tests/ainstest.prg
|
||||
* tests/altdtest.prg
|
||||
* tests/and_or.prg
|
||||
* tests/array16.prg
|
||||
* tests/arrayidx.prg
|
||||
* tests/arrays.prg
|
||||
* tests/arreval.prg
|
||||
* tests/arrindex.prg
|
||||
* tests/atest.prg
|
||||
* tests/box.prg
|
||||
* tests/boxtst2.prg
|
||||
* tests/byref.prg
|
||||
* tests/calling.prg
|
||||
* tests/clasinit.prg
|
||||
* tests/clasname.prg
|
||||
* tests/classch.prg
|
||||
* tests/classes.prg
|
||||
* tests/clsdata.prg
|
||||
* tests/cmphello.prg
|
||||
* tests/codebl.prg
|
||||
* tests/codebloc.prg
|
||||
* tests/comments.prg
|
||||
* tests/curdirt.prg
|
||||
* tests/db_brows.prg
|
||||
* tests/dbevalts.prg
|
||||
* tests/docase.prg
|
||||
* tests/dosshell.prg
|
||||
* tests/dupvars.prg
|
||||
* tests/dynobj.prg
|
||||
* tests/dynsym.prg
|
||||
* tests/exittest.prg
|
||||
* tests/extend1.prg
|
||||
* tests/exthrb.prg
|
||||
* tests/fib.prg
|
||||
* tests/fornext.prg
|
||||
* tests/fortest.prg
|
||||
* tests/funcarr.prg
|
||||
* tests/gfx.prg
|
||||
* tests/gtchars.prg
|
||||
* tests/gtcolors.prg
|
||||
* tests/gtkeys.prg
|
||||
* tests/hello.prg
|
||||
* tests/ifelse.prg
|
||||
* tests/inherit.prg
|
||||
* tests/inhprob.prg
|
||||
* tests/inifiles.prg
|
||||
* tests/initexit.prg
|
||||
* tests/inline.prg
|
||||
* tests/iotest.prg
|
||||
* tests/iotest2.prg
|
||||
* tests/keywords.prg
|
||||
* tests/langmsg.prg
|
||||
* tests/linecont.prg
|
||||
* tests/lnlenli1.prg
|
||||
* tests/lnlenli2.prg
|
||||
* tests/longdev.prg
|
||||
* tests/longstr.prg
|
||||
* tests/longstr2.prg
|
||||
* tests/mathtest.prg
|
||||
* tests/memfile.prg
|
||||
* tests/memory.prg
|
||||
* tests/readhrb.prg
|
||||
* tests/rto_get.prg
|
||||
* tests/rto_tb.prg
|
||||
* tests/scroll.prg
|
||||
* tests/seconds.prg
|
||||
* tests/set_test.prg
|
||||
* tests/speedold.prg
|
||||
* tests/stripem.prg
|
||||
* tests/t1.prg
|
||||
* tests/test_all.prg
|
||||
* tests/testbrw.prg
|
||||
* tests/testhtml.prg
|
||||
* tests/testid.prg
|
||||
* tests/testpre.prg
|
||||
* tests/testwarn.prg
|
||||
* tests/ticktime.prg
|
||||
* tests/tstchbx.prg
|
||||
* tests/tstmacro.prg
|
||||
* tests/tstprag.prg
|
||||
* tests/vec1.prg
|
||||
* tests/videotst.prg
|
||||
* tests/vidtest.prg
|
||||
* cleaning up tests (roughly complete)
|
||||
|
||||
2012-07-18 13:54 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
+ contrib/hbgt/tests
|
||||
+ contrib/hbgt/tests/test.prg
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "inkey.ch"
|
||||
#include "achoice.ch"
|
||||
|
||||
FUNCTION main()
|
||||
PROCEDURE Main()
|
||||
|
||||
//NIL, empty, numeric, and "not handled" - items
|
||||
//must be inaccesible and invisible
|
||||
@@ -73,7 +73,7 @@ FUNCTION main()
|
||||
|
||||
ENDDO
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
//Test for current and previous items
|
||||
//highliting-dehighliting algoritm
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
TestIt( "*.*" )
|
||||
TestIt( "\" )
|
||||
TestIt( "..\" )
|
||||
TestIt( "..\*.*" )
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION TestIt( cSpec )
|
||||
|
||||
|
||||
@@ -1,94 +1,94 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
//
|
||||
// Array test aIns / aDel / aSize / aFill
|
||||
// Array test AIns / ADel / ASize / AFill
|
||||
//
|
||||
// Date : 26/4/99
|
||||
// Time : 09:30
|
||||
//
|
||||
function Main()
|
||||
|
||||
local aFirst
|
||||
local aSecond
|
||||
local aMore
|
||||
PROCEDURE Main()
|
||||
|
||||
aFirst := aClone( { 1,2,4 } )
|
||||
aIns( aFirst, 3 )
|
||||
aFirst[3] := "3"
|
||||
QQOut( "Testing aIns .. " )
|
||||
aDump( aFirst )
|
||||
LOCAL aFirst
|
||||
LOCAL aSecond
|
||||
LOCAL aMore
|
||||
|
||||
aSecond := { 1,2,4 }
|
||||
aSize( aSecond, 4 )
|
||||
QQOut( "Testing aSize .. " )
|
||||
aDump( aSecond )
|
||||
aFirst := AClone( { 1, 2, 4 } )
|
||||
AIns( aFirst, 3 )
|
||||
aFirst[ 3 ] := "3"
|
||||
QQOut( "Testing aIns .. " )
|
||||
aDump( aFirst )
|
||||
|
||||
aSecond := { 1,2,4 }
|
||||
aSize( aSecond, 4 )
|
||||
aIns( aSecond, 3 )
|
||||
aSecond[3] := "3"
|
||||
QQOut( "Testing aSize + aIns .. " )
|
||||
aDump( aSecond )
|
||||
aSecond := { 1, 2, 4 }
|
||||
ASize( aSecond, 4 )
|
||||
QQOut( "Testing aSize .. " )
|
||||
aDump( aSecond )
|
||||
|
||||
aSecond := { 1,2,3,3,4,5 }
|
||||
aDel( aSecond, 3 )
|
||||
QQOut( "Testing aDel .. " )
|
||||
aDump( aSecond )
|
||||
aSecond := { 1, 2, 4 }
|
||||
ASize( aSecond, 4 )
|
||||
AIns( aSecond, 3 )
|
||||
aSecond[ 3 ] := "3"
|
||||
QQOut( "Testing aSize + aIns .. " )
|
||||
aDump( aSecond )
|
||||
|
||||
aSecond := { 1,2,3,3,4,5 }
|
||||
aDel( aSecond, 3 )
|
||||
aSize( aSecond, len(aSecond) - 1 )
|
||||
QQOut( "Testing aSize + aDel .. " )
|
||||
aDump( aSecond )
|
||||
aSecond := { 1, 2, 3, 3, 4, 5 }
|
||||
ADel( aSecond, 3 )
|
||||
QQOut( "Testing aDel .. " )
|
||||
aDump( aSecond )
|
||||
|
||||
aFill( aSecond, "!" )
|
||||
QQOut( "Testing aFill .. " )
|
||||
aDump( aSecond )
|
||||
aSecond := { 1, 2, 3, 3, 4, 5 }
|
||||
ADel( aSecond, 3 )
|
||||
ASize( aSecond, Len( aSecond ) - 1 )
|
||||
QQOut( "Testing aSize + aDel .. " )
|
||||
aDump( aSecond )
|
||||
|
||||
aMore := { 1,2,3,4,5,6 }
|
||||
aFill( aMore, "X", 3 )
|
||||
QQOut( "Testing aFill with start .. " )
|
||||
aDump( aMore )
|
||||
AFill( aSecond, "!" )
|
||||
QQOut( "Testing aFill .. " )
|
||||
aDump( aSecond )
|
||||
|
||||
aMore := { 1,2,3,4,5,6 }
|
||||
aFill( aMore, "X", 3, 2 )
|
||||
QQOut( "Testing aFill with start and count .. " )
|
||||
aDump( aMore )
|
||||
aMore := { 1, 2, 3, 4, 5, 6 }
|
||||
AFill( aMore, "X", 3 )
|
||||
QQOut( "Testing aFill with start .. " )
|
||||
aDump( aMore )
|
||||
|
||||
aMore := { {1,2}, {3,4} }
|
||||
aDel( aMore, 1 )
|
||||
aDump( aMore )
|
||||
return nil
|
||||
aMore := { 1, 2, 3, 4, 5, 6 }
|
||||
AFill( aMore, "X", 3, 2 )
|
||||
QQOut( "Testing aFill with start and count .. " )
|
||||
aDump( aMore )
|
||||
|
||||
function aDump( aShow )
|
||||
aMore := { { 1, 2 }, { 3, 4 } }
|
||||
ADel( aMore, 1 )
|
||||
aDump( aMore )
|
||||
|
||||
local n
|
||||
local CRLF := chr(13)+chr(10)
|
||||
RETURN
|
||||
|
||||
QQOut( "Len=", ALLTRIM( STR( len( aShow ) ) ) )
|
||||
FUNCTION aDump( aShow )
|
||||
|
||||
LOCAL n
|
||||
LOCAL CRLF := Chr( 13 ) + Chr( 10 )
|
||||
|
||||
QQOut( "Len=", hb_ntos( Len( aShow ) ) )
|
||||
QQOut( ": " )
|
||||
for n := 1 to len(aShow)
|
||||
FOR n := 1 TO Len( aShow )
|
||||
|
||||
QQOut( "[" )
|
||||
QQOut( ALLTRIM (STR (n)) )
|
||||
QQOut( hb_ntos( n ) )
|
||||
QQOut( "]= " )
|
||||
QQOut( ValType( aShow[n] ) )
|
||||
QQOut( ValType( aShow[ n ] ) )
|
||||
QQOut( ":" )
|
||||
if ValType( aShow[n] ) == "A" /* Iterate array */
|
||||
IF ValType( aShow[ n ] ) == "A" /* Iterate array */
|
||||
QQOut( CRLF )
|
||||
QQOut("[")
|
||||
aDump( aShow[n] )
|
||||
QQOut("]")
|
||||
else
|
||||
QQOut( aShow[n] )
|
||||
endif
|
||||
QQOut( "[" )
|
||||
aDump( aShow[ n ] )
|
||||
QQOut( "]" )
|
||||
ELSE
|
||||
QQOut( aShow[ n ] )
|
||||
ENDIF
|
||||
|
||||
if n != len(aShow)
|
||||
IF n != Len( aShow )
|
||||
QQOut( ", " )
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
next n
|
||||
NEXT
|
||||
QQOut( CRLF )
|
||||
return nil
|
||||
|
||||
RETURN nil
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing AltD()
|
||||
// Notice you have to compile it using /b
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
AltD( 1 ) // Enables the debugger. Press F5 to go
|
||||
|
||||
@@ -15,4 +15,4 @@ function Main()
|
||||
|
||||
Alert( "debugger invoked" )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour AND OR operators
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
QOut( "Testing logical shortcuts" )
|
||||
|
||||
if .f. .and. QOut( "this should not show!" ) // and it should not break!
|
||||
endif
|
||||
IF .F. .AND. QOut( "this should not show!" ) // and it should not break!
|
||||
ENDIF
|
||||
|
||||
QOut( "Testing .t. .t." )
|
||||
AndOr( .t., .t. )
|
||||
AndOr( .T. , .T. )
|
||||
|
||||
QOut( "Testing .t. .f." )
|
||||
AndOr( .t., .f. )
|
||||
AndOr( .T. , .F. )
|
||||
|
||||
QOut( "Testing .f. .f." )
|
||||
AndOr( .f., .f. )
|
||||
AndOr( .F. , .F. )
|
||||
|
||||
QOut( "Testing errors..." )
|
||||
AndOr( 1, .t. )
|
||||
AndOr( 1, .T. )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function AndOr( lValue1, lValue2 )
|
||||
FUNCTION AndOr( lValue1, lValue2 )
|
||||
|
||||
if lValue1 .and. lValue2
|
||||
IF lValue1 .AND. lValue2
|
||||
QOut( "They are both true" )
|
||||
else
|
||||
ELSE
|
||||
QOut( "They are not both true" )
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
if lValue1 .or. lValue2
|
||||
IF lValue1 .OR. lValue2
|
||||
QOut( "At least one of them is true" )
|
||||
else
|
||||
ELSE
|
||||
QOut( "None of them are true" )
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Harbour multidimensional arrays support
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local a := { 100, 200, "Third" }
|
||||
local b := Array( 8832 ) // 8832 elements !!! Maximum for 16 Bit !!!
|
||||
LOCAL a := { 100, 200, "Third" }
|
||||
LOCAL b := Array( 8832 ) // 8832 elements !!! Maximum for 16 Bit !!!
|
||||
|
||||
QOut( ValType( a ) )
|
||||
QOut( ValType( { "A" } ) )
|
||||
@@ -35,39 +35,39 @@ function Main()
|
||||
|
||||
QOut( b[ 8832 ] )
|
||||
|
||||
QOut( atail( b ) )
|
||||
QOut( ATail( b ) )
|
||||
|
||||
ASize( b, 200 )
|
||||
QOut( Len( b ) )
|
||||
|
||||
b[ 100 ] := 10
|
||||
Test( b[ 100 ]++ )
|
||||
Test( b[ 100 ] ++ )
|
||||
QOut( b[ 100 ] )
|
||||
|
||||
b[ 100 ] := 10
|
||||
Test( ++b[ 100 ] )
|
||||
Test( ++ b[ 100 ] )
|
||||
QOut( b[ 100 ] )
|
||||
|
||||
b := { 1, { 2, { 4, 5 } } }
|
||||
Test( b[ 2 ][ 2 ][ 1 ]++ )
|
||||
Test( b[ 2 ][ 2 ][ 1 ] ++ )
|
||||
QOut( b[ 2 ][ 2 ][ 1 ] )
|
||||
|
||||
b[ 2 ][ 2 ][ 1 ] := 2
|
||||
Test( ++b[ 2 ][ 2 ][ 1 ] )
|
||||
Test( ++ b[ 2 ][ 2 ][ 1 ] )
|
||||
QOut( b[ 2 ][ 2 ][ 1 ] )
|
||||
|
||||
ReleaseTest()
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function Test( n )
|
||||
FUNCTION Test( n )
|
||||
|
||||
QOut( n )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
function ReleaseTest()
|
||||
FUNCTION ReleaseTest()
|
||||
|
||||
local a := { 1, 2, 3 }
|
||||
LOCAL a := { 1, 2, 3 }
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
//
|
||||
// Array Index tests
|
||||
@@ -12,20 +12,22 @@
|
||||
//
|
||||
// Placed in the public domain
|
||||
//
|
||||
function Main()
|
||||
|
||||
local aList := { 1, 2, 3, 4, 5, 6 }
|
||||
PROCEDURE Main()
|
||||
|
||||
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] )
|
||||
return nil
|
||||
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 ] )
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Harbour multidimensional arrays support
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local a := { 100, 200, "Third" }
|
||||
local b := Array( 10000 ) // 10.000 elements !!!
|
||||
LOCAL a := { 100, 200, "Third" }
|
||||
LOCAL b := Array( 10000 ) // 10.000 elements !!!
|
||||
|
||||
QOut( ValType( a ) )
|
||||
QOut( ValType( { "A" } ) )
|
||||
@@ -56,16 +56,16 @@ function Main()
|
||||
|
||||
ReleaseTest()
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function Test( n )
|
||||
FUNCTION Test( n )
|
||||
|
||||
QOut( n )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
function ReleaseTest()
|
||||
FUNCTION ReleaseTest()
|
||||
|
||||
local a := { 1, 2, 3 }
|
||||
LOCAL a := { 1, 2, 3 }
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local a := { 100, 200, 300 }
|
||||
LOCAL a := { 100, 200, 300 }
|
||||
|
||||
aEval(a, {|nValue, nIndex| QOut(nValue, nIndex) })
|
||||
|
||||
return nil
|
||||
AEval( a, {| nValue, nIndex | QOut( nValue, nIndex ) } )
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
Function Main
|
||||
PROCEDURE Main()
|
||||
|
||||
local a, b , c
|
||||
LOCAL a, b, c
|
||||
|
||||
a := { {,} }
|
||||
a := { { , } }
|
||||
|
||||
a [ 1, 2 ] := [Hello]
|
||||
a[ 1, 2 ] := [Hello]
|
||||
|
||||
c := { 1 }
|
||||
|
||||
b := a [ c [1] ] [ val( [2] ) ]
|
||||
b := a[ c[ 1 ] ][ val( [ 2 ] ) ]
|
||||
|
||||
QOut( b )
|
||||
|
||||
return NIL
|
||||
RETURN
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// releasing arrays test
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local a := { 1 }
|
||||
LOCAL a := { 1 }
|
||||
|
||||
a[ 1 ] := a
|
||||
a[ 1 ] := nil
|
||||
a[ 1 ] := NIL
|
||||
|
||||
QOut( "The array will try to be released now..." )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour device management.
|
||||
|
||||
#include "box.ch"
|
||||
function Main()
|
||||
|
||||
dispbox( 1, 1, 5, 5, B_SINGLE + 'X', 'color not supported')
|
||||
dispbox( 7, 7, 13, 72, B_DOUBLE + '.')
|
||||
dispbox( 14, 14, 22, 22, B_SINGLE_DOUBLE )
|
||||
PROCEDURE Main()
|
||||
|
||||
return nil
|
||||
DispBox( 1, 1, 5, 5, B_SINGLE + 'X', 'color not supported' )
|
||||
DispBox( 7, 7, 13, 72, B_DOUBLE + '.' )
|
||||
DispBox( 14, 14, 22, 22, B_SINGLE_DOUBLE )
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -10,44 +10,45 @@
|
||||
|
||||
#include "box.ch"
|
||||
|
||||
function Main()
|
||||
local max_row, max_col, boxColor := "W+/B,N/BG", lineColor := "W+/R, N/BG"
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL max_row, max_col, boxColor := "W+/B,N/BG", lineColor := "W+/R, N/BG"
|
||||
|
||||
SetMode( 50, 80 )
|
||||
CLEAR SCREEN
|
||||
max_row := MaxRow()
|
||||
max_col := MaxCol()
|
||||
|
||||
SetMode(50, 80)
|
||||
clear screen
|
||||
max_row := maxrow()
|
||||
max_col := maxcol()
|
||||
|
||||
// Draw filled boxes centered around the four screen corners.
|
||||
DispBox(-10, -10, 10, 10, B_SINGLE + "X", boxColor)
|
||||
DispBox(-10, max_col - 10, 10, max_col + 10, B_SINGLE + "X", boxColor)
|
||||
DispBox(max_row - 10, -10, max_row + 10, 10, B_SINGLE + "X", boxColor)
|
||||
DispBox(max_row - 10, max_col - 10, max_row + 10, max_col + 10, B_SINGLE + "X", boxColor)
|
||||
|
||||
DispBox( -10, -10, 10, 10, B_SINGLE + "X", boxColor )
|
||||
DispBox( -10, max_col - 10, 10, max_col + 10, B_SINGLE + "X", boxColor )
|
||||
DispBox( max_row - 10, - 10, max_row + 10, 10, B_SINGLE + "X", boxColor )
|
||||
DispBox( max_row - 10, max_col - 10, max_row + 10, max_col + 10, B_SINGLE + "X", boxColor )
|
||||
|
||||
// Draw non-filled boxes around the filled boxes.
|
||||
DispBox(-15, -15, 15, 15, 1, boxColor)
|
||||
DispBox(-15, max_col - 15, 15, max_col + 15, 1, boxColor)
|
||||
DispBox(max_row - 15, -15, max_row + 15, 15, 1, boxColor)
|
||||
DispBox(max_row - 15, max_col - 15, max_row + 15, max_col + 15, 1, boxColor)
|
||||
|
||||
DispBox( -15, -15, 15, 15, 1, boxColor )
|
||||
DispBox( -15, max_col - 15, 15, max_col + 15, 1, boxColor )
|
||||
DispBox( max_row - 15, - 15, max_row + 15, 15, 1, boxColor )
|
||||
DispBox( max_row - 15, max_col - 15, max_row + 15, max_col + 15, 1, boxColor )
|
||||
|
||||
// Draw a box in the center, then two boxes off screen.
|
||||
|
||||
DispBox( 20, 20, 25, 60, 2, boxColor)
|
||||
DispBox( -10, -10, -1, -1, 2, boxColor)
|
||||
DispBox( max_row + 1, max_col + 1, max_row + 10, max_col + 10, 2, boxColor)
|
||||
|
||||
|
||||
DispBox( 20, 20, 25, 60, 2, boxColor )
|
||||
DispBox( -10, -10, -1, -1, 2, boxColor )
|
||||
DispBox( max_row + 1, max_col + 1, max_row + 10, max_col + 10, 2, boxColor )
|
||||
|
||||
// Draw horizontal lines from off-screen to on-screen,
|
||||
// off-screen to off-screen, and on-screen to off-screen.
|
||||
DispBox(1, -10, 1, 10, B_SINGLE, lineColor)
|
||||
DispBox(2, -10, 2, max_col + 10, B_DOUBLE, lineColor)
|
||||
DispBox(3, max_col - 10, 3, max_col + 10, B_SINGLE, lineColor)
|
||||
DispBox( 1, -10, 1, 10, B_SINGLE, lineColor )
|
||||
DispBox( 2, -10, 2, max_col + 10, B_DOUBLE, lineColor )
|
||||
DispBox( 3, max_col - 10, 3, max_col + 10, B_SINGLE, lineColor )
|
||||
|
||||
// Draw vertical lines from off-screen to on-screen,
|
||||
// off-screen to off-screen, and on-screen to off-screen.
|
||||
DispBox(-10, 1, 10, 1, B_SINGLE, lineColor)
|
||||
DispBox(-10, 2, max_row + 10, 2, B_DOUBLE, lineColor)
|
||||
DispBox(max_row - 10, 3, max_row + 10, 3, B_SINGLE, lineColor)
|
||||
DispBox( -10, 1, 10, 1, B_SINGLE, lineColor )
|
||||
DispBox( -10, 2, max_row + 10, 2, B_DOUBLE, lineColor )
|
||||
DispBox( max_row - 10, 3, max_row + 10, 3, B_SINGLE, lineColor )
|
||||
|
||||
inkey(5)
|
||||
Inkey( 5 )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,59 +1,61 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Managing variables by reference
|
||||
|
||||
function Main()
|
||||
STATIC s:=10
|
||||
PROCEDURE Main()
|
||||
|
||||
local x := 0
|
||||
STATIC s := 10
|
||||
|
||||
LOCAL x := 0
|
||||
|
||||
QOut( "Managing LOCAL variables by reference" )
|
||||
Qout( 'In main before ref1 x=', x )
|
||||
QOut( 'In main before ref1 x=', x )
|
||||
ref1( @x )
|
||||
Qout( ' In main after ref1 x=', x )
|
||||
QOut( ' In main after ref1 x=', x )
|
||||
|
||||
|
||||
QOut( "Managing STATIC variables by reference" )
|
||||
Qout( 'In main before ref1 s=', s )
|
||||
QOut( 'In main before ref1 s=', s )
|
||||
ref1( @s )
|
||||
Qout( ' In main after ref1 s=', s )
|
||||
QOut( ' In main after ref1 s=', s )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function ref1( x )
|
||||
FUNCTION ref1( x )
|
||||
|
||||
x++
|
||||
Qout( ' In ref1 before ref2 =', x )
|
||||
Ref2( @x )
|
||||
Qout( ' In ref1 after ref2 =', x )
|
||||
x ++
|
||||
QOut( ' In ref1 before ref2 =', x )
|
||||
Ref2( @x )
|
||||
QOut( ' In ref1 after ref2 =', x )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
function ref2( x )
|
||||
FUNCTION ref2( x )
|
||||
|
||||
x++
|
||||
Qout( ' In ref2 before ref3 =', x )
|
||||
Ref3( @x )
|
||||
Qout( ' In ref2 after ref3 =', x )
|
||||
x ++
|
||||
QOut( ' In ref2 before ref3 =', x )
|
||||
Ref3( @x )
|
||||
QOut( ' In ref2 after ref3 =', x )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
function ref3( x )
|
||||
STATIC a
|
||||
FUNCTION ref3( x )
|
||||
|
||||
x++
|
||||
Qout( ' In ref3 before ref4 =', x )
|
||||
a ={ x, x }
|
||||
Ref4( @a )
|
||||
Qout( ' In ref3 after ref4 =', x )
|
||||
STATIC a
|
||||
|
||||
return nil
|
||||
x ++
|
||||
QOut( ' In ref3 before ref4 =', x )
|
||||
a = { x, x }
|
||||
Ref4( @a )
|
||||
QOut( ' In ref3 after ref4 =', x )
|
||||
|
||||
function ref4( a )
|
||||
RETURN nil
|
||||
|
||||
a[ 1 ]++
|
||||
Qout( ' In ref4 =', a[ 1 ] )
|
||||
FUNCTION ref4( a )
|
||||
|
||||
return nil
|
||||
a[ 1 ] ++
|
||||
QOut( ' In ref4 =', a[ 1 ] )
|
||||
|
||||
RETURN nil
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Calling different PRG functions
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
SecondOne()
|
||||
|
||||
@@ -12,24 +12,24 @@ function Main()
|
||||
|
||||
QOut( "Ok, back to Main()" )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function SecondOne()
|
||||
FUNCTION SecondOne()
|
||||
|
||||
QOut( "Ok, this is from Second() function call" )
|
||||
|
||||
Third()
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
function Third()
|
||||
FUNCTION Third()
|
||||
|
||||
QOut( "Ok, this is from Third() function call" )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
function Fourth( cText )
|
||||
FUNCTION Fourth( cText )
|
||||
|
||||
QOut( cText )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Using Harbour Class HBClass
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local oForm := TForm():New()
|
||||
local oSecond
|
||||
LOCAL oForm := TForm():New()
|
||||
LOCAL oSecond
|
||||
|
||||
QOut( "What's the default oForm and calculate area" )
|
||||
Debug( oForm )
|
||||
@@ -22,13 +22,13 @@ function Main()
|
||||
Debug( oSecond )
|
||||
QOut( oSecond:CalcArea() )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function TForm()
|
||||
FUNCTION TForm()
|
||||
|
||||
static oClass
|
||||
STATIC oClass
|
||||
|
||||
if oClass == nil
|
||||
IF oClass == nil
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cName" ) // define this class objects datas
|
||||
@@ -40,23 +40,23 @@ function TForm()
|
||||
oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
oClass:AddMethod( "Show", @Show() )
|
||||
oClass:AddInline( "CalcArea", ;
|
||||
{|self| ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) } )
|
||||
{ |self| ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) } )
|
||||
|
||||
oClass:Create() // builds this class
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
return oClass:Instance() // builds an object of this class
|
||||
RETURN oClass:Instance() // builds an object of this class
|
||||
|
||||
static function New()
|
||||
STATIC FUNCTION New()
|
||||
|
||||
local Self := QSelf()
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
return Self
|
||||
RETURN Self
|
||||
|
||||
static function Show()
|
||||
STATIC FUNCTION Show()
|
||||
|
||||
local Self := QSelf()
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
QOut( "lets show a form from here :-)" )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//NOTEST
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// The following code tests the application of the className message
|
||||
// against the "fundemental" types of Clipper.
|
||||
@@ -9,49 +9,48 @@
|
||||
// These tests were written by Dave Pearson <davep@hagbard.demon.co.uk>
|
||||
// and are placed into the public domain.
|
||||
|
||||
Function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
// First, try all the types. This checks that the VM can cope.
|
||||
|
||||
aeval( { NIL, {}, "", 0, ctod( "" ), .F., {|| NIL }, ErrorNew() },;
|
||||
{|x| qout( x:className ) } )
|
||||
AEval( { NIL, {}, "", 0, CToD( "" ), .F. , {|| NIL }, ErrorNew() }, ;
|
||||
{| x | QOut( x:className ) } )
|
||||
|
||||
// Now try against values "in the code". This checks that the
|
||||
// compiler can cope.
|
||||
|
||||
?
|
||||
|
||||
qout( NIL:className )
|
||||
qout( {}:className )
|
||||
qout( "":className )
|
||||
qout( 0:className )
|
||||
qout( ctod( "" ):className )
|
||||
qout( .f.:className )
|
||||
qout( {|| nil }:className )
|
||||
qout( ErrorNew():className )
|
||||
QOut( NIL:className )
|
||||
QOut( {}:className )
|
||||
QOut( "":className )
|
||||
QOut( 0:className )
|
||||
QOut( CToD( "" ):className )
|
||||
QOut( .F. :className )
|
||||
QOut( {|| NIL }:className )
|
||||
QOut( 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 )
|
||||
QOut( NIL : className )
|
||||
QOut( {} : className )
|
||||
QOut( "" : className )
|
||||
QOut( 0 : className )
|
||||
QOut( CToD( "" ) : className )
|
||||
QOut( .F. : className )
|
||||
QOut( {|| NIL } : className )
|
||||
QOut( ErrorNew() : className )
|
||||
|
||||
// Now for some sillier ones. If the above work the following should
|
||||
// work too.
|
||||
|
||||
?
|
||||
qout( ( NIL:className ):className )
|
||||
QOut( ( NIL:className ):className )
|
||||
|
||||
?
|
||||
qout( ( ( NIL:className ):className ):className )
|
||||
|
||||
Return( NIL )
|
||||
QOut( ( ( NIL:className ):className ):className )
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour hbclass.ch commands
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
//--------------------------------------------------------------------//
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local o := TTest():New( "one", "two" )
|
||||
LOCAL o := TTest():New( "one", "two" )
|
||||
|
||||
? o:ClassName()
|
||||
? o:One
|
||||
@@ -18,13 +18,13 @@ function Main()
|
||||
|
||||
o:Test()
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
//--------------------------------------------------------------------//
|
||||
|
||||
CLASS TTest INHERIT TParent
|
||||
CREATE CLASS TTest INHERIT TParent
|
||||
|
||||
DATA One, Two, Three
|
||||
VAR One, Two, Three
|
||||
|
||||
METHOD New( One, Two )
|
||||
|
||||
@@ -41,13 +41,13 @@ METHOD New( One, Two ) CLASS TTest
|
||||
::One := One
|
||||
::Two := Two
|
||||
|
||||
return Self
|
||||
RETURN Self
|
||||
|
||||
//--------------------------------------------------------------------//
|
||||
|
||||
CLASS TParent
|
||||
CREATE CLASS TParent
|
||||
|
||||
DATA One
|
||||
VAR One
|
||||
|
||||
METHOD New()
|
||||
|
||||
@@ -59,6 +59,6 @@ METHOD New() CLASS TParent
|
||||
|
||||
? "TParent:New()"
|
||||
|
||||
return Self
|
||||
RETURN Self
|
||||
|
||||
//--------------------------------------------------------------------//
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Using Harbour Class HBClass
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local oForm := TForm():New()
|
||||
LOCAL oForm := TForm():New()
|
||||
|
||||
QOut( oForm:ClassName() )
|
||||
|
||||
oForm:Show()
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function TForm()
|
||||
FUNCTION TForm()
|
||||
|
||||
static oClass
|
||||
STATIC oClass
|
||||
|
||||
if oClass == nil
|
||||
IF oClass == nil
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cName" ) // define this class objects datas
|
||||
@@ -31,25 +31,25 @@ function TForm()
|
||||
oClass:AddMethod( "Show", @Show() )
|
||||
|
||||
oClass:Create() // builds this class
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
return oClass:Instance() // builds an object of this class
|
||||
RETURN oClass:Instance() // builds an object of this class
|
||||
|
||||
static function New()
|
||||
STATIC FUNCTION New()
|
||||
|
||||
local Self := QSelf()
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
::nTop := 10
|
||||
::nLeft := 10
|
||||
::nBottom := 20
|
||||
::nRight := 40
|
||||
|
||||
return Self
|
||||
RETURN Self
|
||||
|
||||
static function Show()
|
||||
STATIC FUNCTION Show()
|
||||
|
||||
local Self := QSelf()
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
QOut( "lets show a form from here :-)" )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
Function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL o := HBObject():New()
|
||||
|
||||
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:Test()
|
||||
|
||||
return NIL
|
||||
RETURN
|
||||
|
||||
Function TBaseObject()
|
||||
FUNCTION TBaseObject()
|
||||
|
||||
static oClass
|
||||
STATIC oClass
|
||||
|
||||
if oClass == NIL
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "TBaseObject" )
|
||||
oClass:AddData( "Data1" )
|
||||
oClass:AddClassData( "ClassData1" )
|
||||
@@ -26,46 +27,51 @@ Function TBaseObject()
|
||||
oClass:AddMethod( "Method1", @Method1Base() )
|
||||
oClass:AddMethod( "Method2", @Method2Base() )
|
||||
oClass:Create()
|
||||
endif
|
||||
return oClass:Instance()
|
||||
ENDIF
|
||||
|
||||
static function NewBase()
|
||||
RETURN oClass:Instance()
|
||||
|
||||
local self := QSelf()
|
||||
STATIC FUNCTION NewBase()
|
||||
|
||||
LOCAL self := QSelf()
|
||||
|
||||
::Data1 := 1
|
||||
::ClassData1 := "A"
|
||||
return self
|
||||
|
||||
static function Test()
|
||||
RETURN self
|
||||
|
||||
local self := QSelf()
|
||||
STATIC FUNCTION Test()
|
||||
|
||||
LOCAL self := QSelf()
|
||||
|
||||
QOut( "Inside ::Test() " )
|
||||
QOut( "calling ::Method1() " )
|
||||
::Method1()
|
||||
return self
|
||||
|
||||
static function Method1Base()
|
||||
RETURN self
|
||||
|
||||
local self := QSelf()
|
||||
STATIC FUNCTION Method1Base()
|
||||
|
||||
LOCAL self := QSelf()
|
||||
|
||||
QOut( "I am Method1 from TBaseObject" )
|
||||
::Method2()
|
||||
return self
|
||||
|
||||
static function Method2Base()
|
||||
RETURN self
|
||||
|
||||
local self := QSelf()
|
||||
STATIC FUNCTION Method2Base()
|
||||
|
||||
LOCAL self := QSelf()
|
||||
|
||||
QOut( "I am Method2 from TBaseObject" )
|
||||
return self
|
||||
|
||||
Function HBObject()
|
||||
RETURN self
|
||||
|
||||
static oClass
|
||||
FUNCTION HBObject()
|
||||
|
||||
if oClass == NIL
|
||||
STATIC oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "HBObject", "TBaseObject" )
|
||||
oClass:AddData( "Data2" )
|
||||
oClass:AddClassData( "ClassData2" )
|
||||
@@ -73,32 +79,36 @@ Function HBObject()
|
||||
oClass:AddMethod( "Method1", @Method1() )
|
||||
oClass:AddMethod( "Method2", @Method2() )
|
||||
oClass:Create()
|
||||
endif
|
||||
return oClass:Instance()
|
||||
ENDIF
|
||||
|
||||
static function New()
|
||||
RETURN oClass:Instance()
|
||||
|
||||
local self := QSelf()
|
||||
STATIC FUNCTION New()
|
||||
|
||||
LOCAL self := QSelf()
|
||||
|
||||
::TBaseObject:NewBase()
|
||||
::Data1 := 1
|
||||
::ClassData1 := "A"
|
||||
::Data2 := 2
|
||||
// ClassData2 override ClassData1
|
||||
// ClassData2 override ClassData1
|
||||
::ClassData2 := "B"
|
||||
return self
|
||||
|
||||
static function Method1()
|
||||
RETURN self
|
||||
|
||||
local self := QSelf()
|
||||
STATIC FUNCTION Method1()
|
||||
|
||||
LOCAL self := QSelf()
|
||||
|
||||
QOut( "I am Method1 from HBObject" )
|
||||
::TBaseObject:Method1()
|
||||
return self
|
||||
|
||||
static function Method2()
|
||||
RETURN self
|
||||
|
||||
local self := QSelf()
|
||||
STATIC FUNCTION Method2()
|
||||
|
||||
LOCAL self := QSelf()
|
||||
|
||||
QOut( "I am Method2 from HBObject" )
|
||||
return self
|
||||
|
||||
RETURN self
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
//
|
||||
// Compile Hello
|
||||
@@ -12,17 +12,19 @@
|
||||
//
|
||||
// Placed in the public domain
|
||||
//
|
||||
function Main()
|
||||
|
||||
local cOs := Upper( OS() )
|
||||
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
|
||||
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.exe hello.prg /gHRB" )
|
||||
endif
|
||||
ELSE // Unix / Linux version
|
||||
__Run( "../bin/harbour hello.prg /gHRB" )
|
||||
ENDIF
|
||||
QOut( "Finished compiling" )
|
||||
return nil
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,171 +1,192 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
STATIC cbStatic
|
||||
|
||||
Function Main()
|
||||
Local a := TestBlocks()
|
||||
LOCAL cb
|
||||
PROCEDURE Main()
|
||||
|
||||
qout( eval( a[ 1 ] ) ) // 23
|
||||
qout( eval( a[ 2 ], 42 ) ) // 42
|
||||
qout( eval( a[ 1 ] ) ) // 42
|
||||
qout( eval( a[ 2 ], 15 ) ) // 15
|
||||
LOCAL a := TestBlocks()
|
||||
LOCAL cb
|
||||
|
||||
mqout( 15, eval( a[ 1 ] ) ) // 15 15
|
||||
mqout( 14, eval( a[ 1 ] ) ) // 14 15
|
||||
mqout( 42, eval( a[ 2 ], 42 ) ) // 42 42
|
||||
mqout( 14, eval( a[ 2 ], 42 ) ) // 14 42
|
||||
mqout( 42, eval( a[ 1 ] ) ) // 42 42
|
||||
mqout( 14, eval( a[ 1 ] ) ) // 14 42
|
||||
QOut( Eval( a[ 1 ] ) ) // 23
|
||||
QOut( Eval( a[ 2 ], 42 ) ) // 42
|
||||
QOut( Eval( a[ 1 ] ) ) // 42
|
||||
QOut( Eval( a[ 2 ], 15 ) ) // 15
|
||||
|
||||
mqout( 15, Eval( a[ 1 ] ) ) // 15 15
|
||||
mqout( 14, Eval( a[ 1 ] ) ) // 14 15
|
||||
mqout( 42, Eval( a[ 2 ], 42 ) ) // 42 42
|
||||
mqout( 14, Eval( a[ 2 ], 42 ) ) // 14 42
|
||||
mqout( 42, Eval( a[ 1 ] ) ) // 42 42
|
||||
mqout( 14, Eval( a[ 1 ] ) ) // 14 42
|
||||
|
||||
GetArray( @a )
|
||||
PrintArray( @a )
|
||||
|
||||
qout( "Test for variables passed by reference in a codeblock" )
|
||||
QOut( "Test for variables passed by reference in a codeblock" )
|
||||
DetachWithRefer()
|
||||
|
||||
qout( "Test for indirect detaching of local variables" )
|
||||
QOut( "Test for indirect detaching of local variables" )
|
||||
DetachToStatic( 1 )
|
||||
mqout( 2, EVAL( cbStatic, 1 ) )
|
||||
mqout( 3, EVAL( cbStatic, 2 ) )
|
||||
cb :=cbStatic
|
||||
mqout( 2, Eval( cbStatic, 1 ) )
|
||||
mqout( 3, Eval( cbStatic, 2 ) )
|
||||
cb := cbStatic
|
||||
DetachToStatic( 100 )
|
||||
mqout( 200, EVAL( cbStatic, 100 ) )
|
||||
mqout( 300, EVAL( cbStatic, 200 ) )
|
||||
mqout( 4, EVAL( cb, 3 ) )
|
||||
mqout( 200, Eval( cbStatic, 100 ) )
|
||||
mqout( 300, Eval( cbStatic, 200 ) )
|
||||
mqout( 4, Eval( cb, 3 ) )
|
||||
|
||||
ReferParam()
|
||||
|
||||
Return( NIL )
|
||||
RETURN
|
||||
|
||||
Static Function TestBlocks()
|
||||
LOCAL nFoo := 23
|
||||
Return( { {|| nFoo }, {|n| nFoo := n } } )
|
||||
STATIC FUNCTION TestBlocks()
|
||||
|
||||
Static Function mqout( nExpected, nGot )
|
||||
LOCAL nFoo := 23
|
||||
|
||||
qout( nExpected, nGot )
|
||||
RETURN { {|| nFoo }, {| n | nFoo := n } }
|
||||
|
||||
Return( NIL )
|
||||
STATIC FUNCTION mqout( nExpected, nGot )
|
||||
|
||||
QOut( nExpected, nGot )
|
||||
|
||||
RETURN NIL
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
PROCEDURE GetArray( a )
|
||||
LOCAL i
|
||||
|
||||
a :=ARRAY( 100 )
|
||||
FOR i:=1 TO 100
|
||||
IF (i % 6) == 0
|
||||
a[ i-2 ] =NIL
|
||||
a[ i-4 ] =NIL
|
||||
ENDIF
|
||||
a[ i ] := TestBlocks()
|
||||
PROCEDURE GetArray( a )
|
||||
|
||||
LOCAL i
|
||||
|
||||
a := Array( 100 )
|
||||
FOR i := 1 TO 100
|
||||
IF ( i % 6 ) == 0
|
||||
a[ i-2 ] = NIL
|
||||
a[ i-4 ] = NIL
|
||||
ENDIF
|
||||
a[ i ] := TestBlocks()
|
||||
NEXT
|
||||
|
||||
RETURN
|
||||
RETURN
|
||||
|
||||
PROCEDURE PrintArray( a )
|
||||
LOCAL i
|
||||
|
||||
FOR i:=1 TO 100
|
||||
IF a[i] != NIL
|
||||
EVAL( a[ i ][ 2 ], i )
|
||||
mqout( i, EVAL( a[ i ][ 1 ] ) )
|
||||
ENDIF
|
||||
LOCAL i
|
||||
|
||||
FOR i := 1 TO 100
|
||||
IF a[i] != NIL
|
||||
Eval( a[ i ][ 2 ], i )
|
||||
mqout( i, Eval( a[ i ][ 1 ] ) )
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
RETURN
|
||||
RETURN
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
Function DetachWithRefer()
|
||||
Local nTest
|
||||
Local bBlock1 := MakeBlock()
|
||||
Local bBlock2 := {|| DoThing( @nTest ), qout( nTest ) }
|
||||
|
||||
eval( bBlock1 )
|
||||
eval( bBlock2 )
|
||||
FUNCTION DetachWithRefer()
|
||||
|
||||
Return( NIL )
|
||||
LOCAL nTest
|
||||
LOCAL bBlock1 := MakeBlock()
|
||||
LOCAL bBlock2 := {|| DoThing( @nTest ), QOut( nTest ) }
|
||||
|
||||
Function MakeBlock()
|
||||
Local nTest
|
||||
RETURN( {|| DoThing( @nTest ), qout( nTest ) } )
|
||||
Eval( bBlock1 )
|
||||
Eval( bBlock2 )
|
||||
|
||||
Function DoThing( n )
|
||||
RETURN NIL
|
||||
|
||||
FUNCTION MakeBlock()
|
||||
|
||||
LOCAL nTest
|
||||
|
||||
RETURN {|| DoThing( @nTest ), QOut( nTest ) }
|
||||
|
||||
FUNCTION DoThing( n )
|
||||
|
||||
n := 42
|
||||
|
||||
Return( NIL )
|
||||
RETURN NIL
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
FUNCTION DetachToStatic( n )
|
||||
|
||||
cbStatic ={|x| n+x}
|
||||
cbStatic = {| x | n + x }
|
||||
|
||||
RETURN NIL
|
||||
RETURN NIL
|
||||
|
||||
// ------------------------------------------------------------
|
||||
Function ReferParam()
|
||||
Local bResult
|
||||
// ------------------------------------------------------------
|
||||
|
||||
? "Test for codeblock parameter passed by reference"
|
||||
FUNCTION ReferParam()
|
||||
|
||||
PassByValue( {|lEnd| ;
|
||||
bResult := GetBlock( @lEnd ), ;
|
||||
SetByRef( @lEnd ) } )
|
||||
// Clipper & xHarbour it's .T.
|
||||
//In Harbour it is .F.
|
||||
? "Printed value in Clipper .T. =", Eval( bResult )
|
||||
?
|
||||
// Notice the Clipper bug: GetBlock is receiving the reference to
|
||||
// the codeblock parameter than the value of EVAL(bResult) shouldn't
|
||||
// depend on the order of block creation/value changing (GetBlock/SetRef).
|
||||
LOCAL bResult
|
||||
|
||||
PassByRef( {|lEnd| ;
|
||||
bResult := GetBlock( @lEnd ), ;
|
||||
SetByRef( @lEnd ) } )
|
||||
// Clipper & xHarbour it's .T.
|
||||
//In Harbour it is .F.
|
||||
? "Printed value in Clipper .T. =", Eval( bResult )
|
||||
?
|
||||
? "Test for codeblock parameter passed by reference"
|
||||
|
||||
? "2nd test for codeblock parameter passed by reference"
|
||||
PassByValue( {| lEnd | ;
|
||||
bResult := GetBlock( @lEnd ), ;
|
||||
SetByRef( @lEnd ) } )
|
||||
// Clipper & xHarbour it's .T.
|
||||
//In Harbour it is .F.
|
||||
? "Printed value in Clipper .T. =", Eval( bResult )
|
||||
?
|
||||
// Notice the Clipper bug: GetBlock is receiving the reference to
|
||||
// the codeblock parameter than the value of EVAL(bResult) shouldn't
|
||||
// depend on the order of block creation/value changing (GetBlock/SetRef).
|
||||
|
||||
PassByValue( {|lEnd| ;
|
||||
SetByRef( @lEnd ), ;
|
||||
bResult := GetBlock( @lEnd ) } )
|
||||
// Clipper & xHarbour it's .T.
|
||||
//In Harbour it is .F.
|
||||
? "Printed value in Clipper .F. =", Eval( bResult )
|
||||
?
|
||||
PassByRef( {| lEnd | ;
|
||||
bResult := GetBlock( @lEnd ), ;
|
||||
SetByRef( @lEnd ) } )
|
||||
// Clipper & xHarbour it's .T.
|
||||
//In Harbour it is .F.
|
||||
? "Printed value in Clipper .T. =", Eval( bResult )
|
||||
?
|
||||
|
||||
PassByRef( {|lEnd| ;
|
||||
SetByRef( @lEnd ), ;
|
||||
bResult := GetBlock( @lEnd ) } )
|
||||
// Clipper & xHarbour it's .T.
|
||||
//In Harbour it is .F.
|
||||
? "Printed value in Clipper .F. =", Eval( bResult )
|
||||
?
|
||||
? "2nd test for codeblock parameter passed by reference"
|
||||
|
||||
Return Nil
|
||||
PassByValue( {| lEnd | ;
|
||||
SetByRef( @lEnd ), ;
|
||||
bResult := GetBlock( @lEnd ) } )
|
||||
// Clipper & xHarbour it's .T.
|
||||
//In Harbour it is .F.
|
||||
? "Printed value in Clipper .F. =", Eval( bResult )
|
||||
?
|
||||
|
||||
Static Function PassByValue( bBlock )
|
||||
Local lSomeVar := .T.
|
||||
Eval( bBlock, lSomeVar )
|
||||
? "lSomeVar value in Clipper .T. =", lSomeVar
|
||||
Return .T.
|
||||
PassByRef( {| lEnd | ;
|
||||
SetByRef( @lEnd ), ;
|
||||
bResult := GetBlock( @lEnd ) } )
|
||||
// Clipper & xHarbour it's .T.
|
||||
//In Harbour it is .F.
|
||||
? "Printed value in Clipper .F. =", Eval( bResult )
|
||||
?
|
||||
|
||||
Static Function PassByRef( bBlock )
|
||||
Local lSomeVar := .T.
|
||||
Eval( bBlock, @lSomeVar )
|
||||
? "lSomeVar value in Clipper .F. =", lSomeVar
|
||||
Return .T.
|
||||
RETURN Nil
|
||||
|
||||
Static Function SetByRef( lVar )
|
||||
lVar := .F.
|
||||
Return Nil
|
||||
STATIC FUNCTION PassByValue( bBlock )
|
||||
|
||||
Static Function GetBlock( lVar )
|
||||
Return {|| lVar }
|
||||
// ------------------------------------------------------------
|
||||
LOCAL lSomeVar := .T.
|
||||
|
||||
Eval( bBlock, lSomeVar )
|
||||
? "lSomeVar value in Clipper .T. =", lSomeVar
|
||||
|
||||
RETURN .T.
|
||||
|
||||
STATIC FUNCTION PassByRef( bBlock )
|
||||
|
||||
LOCAL lSomeVar := .T.
|
||||
|
||||
Eval( bBlock, @lSomeVar )
|
||||
? "lSomeVar value in Clipper .F. =", lSomeVar
|
||||
|
||||
RETURN .T.
|
||||
|
||||
STATIC FUNCTION SetByRef( lVar )
|
||||
|
||||
lVar := .F.
|
||||
|
||||
RETURN Nil
|
||||
|
||||
STATIC FUNCTION GetBlock( lVar )
|
||||
|
||||
RETURN {|| lVar }
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// codeblocks test
|
||||
|
||||
function Main()
|
||||
local B := "this will never print"
|
||||
local a := { |b,c| OutStd( "I am a codeblock" + b + c ) }
|
||||
local d
|
||||
local de
|
||||
local ar := { 1, 2 }
|
||||
local crlf:=CHR(13)+chr(10)
|
||||
local YY, X
|
||||
local x1, x2
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL B := "this will never print"
|
||||
LOCAL a := {| b, c | OutStd( "I am a codeblock" + b + c ) }
|
||||
LOCAL d
|
||||
LOCAL de
|
||||
LOCAL ar := { 1, 2 }
|
||||
LOCAL crlf := Chr( 13 ) + Chr( 10 )
|
||||
LOCAL YY, X
|
||||
LOCAL x1, x2
|
||||
|
||||
OutStd( "this should print first" )
|
||||
OutStd( crlf )
|
||||
@@ -20,14 +21,14 @@ function Main()
|
||||
Eval( a, " with parameters", " ... and it works!" )
|
||||
OutStd( crlf )
|
||||
|
||||
d ="with access to local variables"
|
||||
d = "with access to local variables"
|
||||
|
||||
a ={ |b,c| OutStd( "I am a second codeblock " +d +b +;
|
||||
IIF(c==NIL, ' empty second parameter ', c)), OutStd(crlf), "WITH return value" }
|
||||
EVAL( a, ", codeblock parameters" )
|
||||
a = {| b, c | OutStd( "I am a second codeblock " + d + b + ;
|
||||
IIF( c == NIL, ' empty second parameter ', c ) ), OutStd( crlf ), "WITH return value" }
|
||||
Eval( a, ", codeblock parameters" )
|
||||
OutStd( crlf )
|
||||
|
||||
EVAL( a, ", codeblock parameters ", "and with second parameter" )
|
||||
Eval( a, ", codeblock parameters ", "and with second parameter" )
|
||||
OutStd( crlf )
|
||||
|
||||
OutStd( MyEval( a ) )
|
||||
@@ -39,83 +40,88 @@ function Main()
|
||||
AnotherTest( a, "==> Another " )
|
||||
OutStd( crlf )
|
||||
|
||||
a ={|c| IIF( c==NIL, {|a| "First "+a}, {|a| "Second "+a}) }
|
||||
a =EVAL( a )
|
||||
a = {| c | IIF( c == NIL, {| a | "First " + a }, {| a | "Second " + a } ) }
|
||||
a = Eval( a )
|
||||
OutStd( crlf )
|
||||
OutStd( EVAL( a, "codeblock created in a codeblock" ) )
|
||||
OutStd( Eval( a, "codeblock created in a codeblock" ) )
|
||||
OutStd( crlf )
|
||||
|
||||
OutStd( ar[ 1 ] )
|
||||
OutStd( crlf )
|
||||
a :={|| ar[ 1 ]++}
|
||||
EVAL( a )
|
||||
a := {|| ar[ 1 ] ++ }
|
||||
Eval( a )
|
||||
OutStd( ar[ 1 ] )
|
||||
OutStd( crlf )
|
||||
|
||||
yy :=5
|
||||
x :={|xx| OutStd(LTRIM(STR(xx))), OutStd("+"), OutStd(LTRIM(STR(yy))), OutStd("="), xx + yy }
|
||||
OutStd( EVAL( x, 1 ) ) //this is OK
|
||||
yy := 5
|
||||
x := {| xx | OutStd( LTrim( Str(xx ) ) ), OutStd( "+" ), OutStd( LTrim( Str(yy ) ) ), OutStd( "=" ), xx + yy }
|
||||
OutStd( Eval( x, 1 ) ) //this is OK
|
||||
OutStd( CRLF )
|
||||
OutStd( EVAL( x, 1, 2 ) ) //this should ignore unnecesary parameters
|
||||
OutStd( Eval( x, 1, 2 ) ) //this should ignore unnecesary parameters
|
||||
|
||||
QOut( EVAL( RetBlock(), 5 ) )
|
||||
QOut( Eval( RetBlock(), 5 ) )
|
||||
|
||||
// BugToFix()
|
||||
// BugToFix()
|
||||
OutStd( crlf )
|
||||
|
||||
OutStd( "Trying to use detached variable ..." )
|
||||
OutStd( crlf )
|
||||
x1 :=5
|
||||
x2 :=6
|
||||
de =DetachLocal( x1, x2 )
|
||||
OutStd( EVAL( de ) )
|
||||
x1 := 5
|
||||
x2 := 6
|
||||
de = DetachLocal( x1, x2 )
|
||||
OutStd( Eval( de ) )
|
||||
//changing the value of variables
|
||||
OutStd( crlf )
|
||||
x1 := 10
|
||||
x2 := 11
|
||||
QOut( EVAL( de ) )
|
||||
de =DetachLocal( x1, x2 )
|
||||
QOut( EVAL( de ) )
|
||||
QOut( Eval( de ) )
|
||||
de = DetachLocal( x1, x2 )
|
||||
QOut( Eval( de ) )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
FUNCTION MyEval( bCodeBlock )
|
||||
LOCAL D:="this is another variable"
|
||||
|
||||
RETURN( EVAL(bCodeBlock, " from ", "MyEval Function" ) )
|
||||
LOCAL D := "this is another variable"
|
||||
|
||||
RETURN( Eval( bCodeBlock, " from ", "MyEval Function" ) )
|
||||
|
||||
PROCEDURE OtherTest( cblock )
|
||||
LOCAL cb
|
||||
|
||||
cb :={|a,b| EVAL( cblock,a,b ) }
|
||||
LOCAL cb
|
||||
|
||||
EVAL( cb, "--> with nested ", "EVAL" )
|
||||
cb := {| a, b | Eval( cblock, a, b ) }
|
||||
|
||||
RETURN
|
||||
Eval( cb, "--> with nested ", "EVAL" )
|
||||
|
||||
RETURN
|
||||
|
||||
PROCEDURE AnotherTest( cb, a )
|
||||
OutStd( EVAL( cb, a ) )
|
||||
OutStd( chr(13)+chr(10) )
|
||||
OutStd( EVAL( cb, a, "again and again" ) )
|
||||
OutStd( chr(13)+chr(10) )
|
||||
RETURN
|
||||
|
||||
OutStd( Eval( cb, a ) )
|
||||
OutStd( Chr( 13 ) + Chr( 10 ) )
|
||||
OutStd( Eval( cb, a, "again and again" ) )
|
||||
OutStd( Chr( 13 ) + Chr( 10 ) )
|
||||
|
||||
RETURN
|
||||
|
||||
FUNCTION DetachLocal( x, y )
|
||||
//NOTE! this should work
|
||||
LOCAL z:=x+y
|
||||
LOCAL cb:={|| QOut("z=x+y="), QOut(z), QOut("x*x="), QOut(x*x), QOut("x*x+z="), x*x+z}
|
||||
RETURN( cb )
|
||||
|
||||
//NOTE! this should work
|
||||
LOCAL z := x + y
|
||||
LOCAL cb := {|| QOut( "z=x+y=" ), QOut( z ), QOut( "x*x=" ), QOut( x * x ), QOut( "x*x+z=" ), x * x + z }
|
||||
|
||||
RETURN( cb )
|
||||
|
||||
PROCEDURE BugToFix()
|
||||
|
||||
LOCAL b, a := {|| a+b }
|
||||
LOCAL b, a := {|| a + b }
|
||||
|
||||
b ="bug "
|
||||
EVAL( a )
|
||||
b = "bug "
|
||||
Eval( a )
|
||||
|
||||
RETURN
|
||||
RETURN
|
||||
|
||||
FUNCTION RetBlock()
|
||||
|
||||
RETURN( {|x| x*x} )
|
||||
|
||||
RETURN( {| x | x * x } )
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour comments
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
NOTE Old fashion comment
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
/* multiple
|
||||
lines
|
||||
@@ -19,6 +19,4 @@ function Main()
|
||||
|
||||
QOut( "Ok!" ) && old fashion comment
|
||||
|
||||
return nil
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
OutStd( CurDir() + Chr(13) + Chr(10) )
|
||||
OutStd( CurDir("C") + Chr(13) + Chr(10) )
|
||||
OutStd( CurDir("C:") + Chr(13) + Chr(10) )
|
||||
OutStd( CurDir("D:") + Chr(13) + Chr(10) )
|
||||
OutStd( CurDir("A") + Chr(13) + Chr(10) )
|
||||
OutStd( CurDir() + hb_eol() )
|
||||
OutStd( CurDir( "C" ) + hb_eol() )
|
||||
OutStd( CurDir( "C:" ) + hb_eol() )
|
||||
OutStd( CurDir( "D:" ) + hb_eol() )
|
||||
OutStd( CurDir( "A" ) + hb_eol() )
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
//+
|
||||
//+ Source Module => db_brows.prg
|
||||
//+
|
||||
//+ Functions: Function Main()
|
||||
//+ Functions: PROCEDURE Main()
|
||||
//+ Function DBFLIST()
|
||||
//+ Function DBFLIST()
|
||||
//+ Function FLDCOUNT()
|
||||
@@ -82,7 +82,7 @@ MEMVAR str_bar
|
||||
|
||||
//+--------------------------------------------------------------------
|
||||
//+
|
||||
//+ Function Main()
|
||||
//+ PROCEDURE Main()
|
||||
//+
|
||||
//+--------------------------------------------------------------------
|
||||
//+
|
||||
@@ -116,7 +116,7 @@ PROCEDURE Main( filename )
|
||||
//+
|
||||
//+ Function DBFLIST()
|
||||
//+
|
||||
//+ Called from ( db_brows.prg ) 1 - function main()
|
||||
//+ Called from ( db_brows.prg ) 1 - PROCEDURE Main()
|
||||
//+
|
||||
//+--------------------------------------------------------------------
|
||||
//+
|
||||
@@ -767,7 +767,7 @@ FUNCTION GetBuf
|
||||
//+
|
||||
//+ Function InitList()
|
||||
//+
|
||||
//+ Called from ( db_brows.prg ) 1 - function main()
|
||||
//+ Called from ( db_brows.prg ) 1 - PROCEDURE Main()
|
||||
//+ 1 - function dbflist()
|
||||
//+
|
||||
//+--------------------------------------------------------------------
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
LOCAL nCount
|
||||
|
||||
USE test
|
||||
@@ -14,5 +14,4 @@ FUNCTION Main()
|
||||
COUNT TO nCount NEXT 10
|
||||
? RecNo(), nCount
|
||||
|
||||
RETURN NIL
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour Do case
|
||||
// Testing Harbour DO CASE
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local n := 2
|
||||
LOCAL n := 2
|
||||
|
||||
QOut( "testing Harbour Do case" )
|
||||
|
||||
do case
|
||||
case n == 1
|
||||
QOut( "n is 1" )
|
||||
QOut( "first case" )
|
||||
DO CASE
|
||||
CASE n == 1
|
||||
QOut( "n is 1" )
|
||||
QOut( "first case" )
|
||||
|
||||
case n == 2
|
||||
QOut( "n is 2" )
|
||||
QOut( "second case" )
|
||||
CASE n == 2
|
||||
QOut( "n is 2" )
|
||||
QOut( "second case" )
|
||||
|
||||
case n == 3
|
||||
QOut( "n is 3" )
|
||||
QOut( "third case" )
|
||||
CASE n == 3
|
||||
QOut( "n is 3" )
|
||||
QOut( "third case" )
|
||||
|
||||
otherwise
|
||||
QOut( "Sorry, I don't know what n is :-)" )
|
||||
QOut( "otherwise" )
|
||||
endcase
|
||||
OTHERWISE
|
||||
QOut( "Sorry, I don't know what n is :-)" )
|
||||
QOut( "otherwise" )
|
||||
ENDCASE
|
||||
|
||||
QOut( "Ok!" )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//NOTEST // It is very frustrating if this one is auto-tested
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
//
|
||||
// DosShell
|
||||
@@ -16,17 +16,18 @@
|
||||
// Placed in the public domain
|
||||
//
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local cOs := Upper( OS() )
|
||||
local cShell := GetEnv("COMSPEC")
|
||||
LOCAL cOs := Upper( OS() )
|
||||
LOCAL cShell := GetEnv( "COMSPEC" )
|
||||
|
||||
if at( "WINDOWS", cOs ) != 0 .or. at( "DOS", cOs ) != 0 ;
|
||||
.or. at( "OS/2", cOs ) != 0
|
||||
IF At( "WINDOWS", cOs ) != 0 .OR. At( "DOS", cOs ) != 0 ;
|
||||
.OR. At( "OS/2", cOs ) != 0
|
||||
? "About to shell to DOS.."
|
||||
! (cShell)
|
||||
! ( cShell )
|
||||
? "Hey, I am back !"
|
||||
else
|
||||
ELSE
|
||||
? "Sorry this program is for Windows, DOS, and OS/2 only"
|
||||
endif
|
||||
return nil
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
//NOTEST
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour duplicate variable definition detection
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local a, a
|
||||
LOCAL a, a
|
||||
|
||||
QOut( "ok" )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
//
|
||||
// DynObj
|
||||
@@ -15,10 +15,10 @@
|
||||
// Placed in the public domain
|
||||
//
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local oForm := TForm():New()
|
||||
local nSeq
|
||||
LOCAL oForm := TForm():New()
|
||||
LOCAL nSeq
|
||||
|
||||
QOut( "What methods are in the class :" )
|
||||
Debug( __objGetMethodList( oForm ) )
|
||||
@@ -28,7 +28,7 @@ function Main()
|
||||
QOut( "Let's add inline 'CalcArea' at run-time to an already instanced class" )
|
||||
|
||||
__objAddInline( oForm, "CalcArea", ;
|
||||
{|self| ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) } )
|
||||
{| self | ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) } )
|
||||
|
||||
QOut( "What methods are in the class :" )
|
||||
Debug( __objGetMethodList( oForm ) )
|
||||
@@ -72,7 +72,7 @@ function Main()
|
||||
QOut( "And CalcArea() will now give a result in square inches" )
|
||||
|
||||
__objModInline( oForm, "CalcArea", ;
|
||||
{|self| ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) / (2.54*2.54) } )
|
||||
{| self | ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) / ( 2.54 * 2.54 ) } )
|
||||
|
||||
QOut( "What is the Form area ?" )
|
||||
QOut( oForm:CalcArea() )
|
||||
@@ -106,14 +106,13 @@ function Main()
|
||||
|
||||
/* oForm:cHelp := "Please crash" */
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
FUNCTION TForm()
|
||||
|
||||
function TForm()
|
||||
STATIC oClass
|
||||
|
||||
static oClass
|
||||
|
||||
if oClass == nil
|
||||
IF oClass == nil
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cText" ) // define this class objects datas
|
||||
@@ -123,50 +122,46 @@ function TForm()
|
||||
oClass:AddData( "nRight" )
|
||||
|
||||
oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
oClass:AddInline( "Show", {|self| ::cText } )
|
||||
oClass:AddInline( "Show", {| self | ::cText } )
|
||||
|
||||
oClass:Create() // builds this class
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
return oClass:Instance() // builds an object of this class
|
||||
RETURN oClass:Instance() // builds an object of this class
|
||||
|
||||
STATIC FUNCTION New()
|
||||
|
||||
static function New()
|
||||
|
||||
local Self := QSelf()
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
::nTop := 10
|
||||
::nLeft := 10
|
||||
::nBottom := 20
|
||||
::nRight := 40
|
||||
|
||||
return Self
|
||||
RETURN Self
|
||||
|
||||
STATIC FUNCTION Smile()
|
||||
|
||||
static function Smile()
|
||||
|
||||
local self := QSelf()
|
||||
LOCAL self := QSelf()
|
||||
|
||||
if ::CalcArea() == 300
|
||||
QOut( ":-)" )
|
||||
else
|
||||
ELSE
|
||||
QOut( ":-(" )
|
||||
endif
|
||||
return self
|
||||
ENDIF
|
||||
|
||||
RETURN self
|
||||
|
||||
static function BigSmile()
|
||||
STATIC FUNCTION BigSmile()
|
||||
|
||||
local self := QSelf()
|
||||
LOCAL self := QSelf()
|
||||
|
||||
QOut( ":-)))" )
|
||||
return self
|
||||
|
||||
RETURN self
|
||||
|
||||
function Pause()
|
||||
FUNCTION Pause()
|
||||
|
||||
__Accept( "Pause :" )
|
||||
return nil
|
||||
|
||||
|
||||
|
||||
RETURN nil
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
LOCAL nCount := __dynsCount()
|
||||
LOCAL nPos
|
||||
|
||||
@@ -18,5 +18,5 @@ FUNCTION Main()
|
||||
? __dynsGetName( 0 )
|
||||
? __dynsGetName( 100000 )
|
||||
? __dynsGetName( __dynsGetIndex( "HB_THISDOESNTEXIST_" ) )
|
||||
|
||||
RETURN NIL
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// quick exit test
|
||||
|
||||
function main
|
||||
local x := 0
|
||||
PROCEDURE Main()
|
||||
|
||||
do while x < 10
|
||||
++x
|
||||
if x == 5
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
LOCAL x := 0
|
||||
|
||||
qout("do exit test",iif(x == 5,"passed","fail"))
|
||||
DO WHILE x < 10
|
||||
++ x
|
||||
IF x == 5
|
||||
EXIT
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
for x := 1 to 10
|
||||
if x == 5
|
||||
exit
|
||||
endif
|
||||
next
|
||||
QOut( "do exit test", iif( x == 5, "passed", "fail" ) )
|
||||
|
||||
qout("for exit test",iif(x == 5,"passed","fail"))
|
||||
FOR x := 1 TO 10
|
||||
IF x == 5
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
return nil
|
||||
QOut( "for exit test", iif( x == 5, "passed", "fail" ) )
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour Extended system.
|
||||
//
|
||||
// NOTE: compile extend1.prg and extend2.c and link both files
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local uVar
|
||||
LOCAL uVar
|
||||
|
||||
SET CENTURY ON
|
||||
|
||||
@@ -230,9 +230,9 @@ function Main()
|
||||
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( ' _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( "" )
|
||||
@@ -279,4 +279,4 @@ function Main()
|
||||
QOut( "" )
|
||||
QOut( "" )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// see also testhrb.prg
|
||||
|
||||
FUNCTION Msg()
|
||||
|
||||
Function Msg()
|
||||
? "Function called from HRB file"
|
||||
Return .T.
|
||||
? "Function called from HRB file"
|
||||
|
||||
Function msg2()
|
||||
Return Msg()
|
||||
RETURN .T.
|
||||
|
||||
FUNCTION msg2()
|
||||
|
||||
RETURN Msg()
|
||||
|
||||
@@ -1,44 +1,46 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
Function Main()
|
||||
Local n
|
||||
PROCEDURE Main()
|
||||
|
||||
For n := 1 To 20
|
||||
QOut( FibR( n ) )
|
||||
QOut( FibI( n ) )
|
||||
Next
|
||||
LOCAL n
|
||||
|
||||
Return( NIL )
|
||||
FOR n := 1 TO 20
|
||||
QOut( FibR( n ) )
|
||||
QOut( FibI( n ) )
|
||||
NEXT
|
||||
|
||||
Function FibR( n )
|
||||
Local nFib
|
||||
RETURN
|
||||
|
||||
If n < 2
|
||||
FUNCTION FibR( n )
|
||||
|
||||
LOCAL nFib
|
||||
|
||||
IF n < 2
|
||||
nFib := n
|
||||
Else
|
||||
ELSE
|
||||
nFib := FibR( n - 2 ) + FibR( n - 1 )
|
||||
EndIf
|
||||
ENDIF
|
||||
|
||||
Return( nFib )
|
||||
RETURN nFib
|
||||
|
||||
Function FibI( n )
|
||||
Local nFibMin1 := 1
|
||||
Local nFibMinN1 := 0
|
||||
Local i := 1
|
||||
Local nFib
|
||||
FUNCTION FibI( n )
|
||||
|
||||
If n < 2
|
||||
LOCAL nFibMin1 := 1
|
||||
LOCAL nFibMinN1 := 0
|
||||
LOCAL i := 1
|
||||
LOCAL nFib
|
||||
|
||||
IF n < 2
|
||||
nFib := n
|
||||
Else
|
||||
Do While i < n
|
||||
ELSE
|
||||
DO WHILE i < n
|
||||
nFib := nFibMin1 + nFibMinN1
|
||||
nFibMinN1 := nFibMin1
|
||||
nFibMin1 := nFib
|
||||
++i
|
||||
EndDo
|
||||
EndIf
|
||||
|
||||
Return( nFib )
|
||||
++ i
|
||||
ENDDO
|
||||
ENDIF
|
||||
|
||||
RETURN nFib
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour For Next loops
|
||||
//
|
||||
@@ -10,34 +10,34 @@
|
||||
// Placed in the public domain
|
||||
//
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local n := 1
|
||||
LOCAL n := 1
|
||||
|
||||
QOut( "Testing Harbour For Next loops. Going up quick" )
|
||||
|
||||
for n:=1 to 10 step 4
|
||||
QOut( n )
|
||||
next n
|
||||
FOR n := 1 TO 10 STEP 4
|
||||
QOut( n )
|
||||
NEXT n
|
||||
|
||||
QOut( "Going down" )
|
||||
|
||||
for n:=10 to 1 step -1
|
||||
QOut( n )
|
||||
next n
|
||||
FOR n := 10 TO 1 step - 1
|
||||
QOut( n )
|
||||
NEXT n
|
||||
|
||||
QOut( "No step" )
|
||||
|
||||
for n:=1 to 10
|
||||
QOut( n )
|
||||
next n
|
||||
FOR n := 1 TO 10
|
||||
QOut( n )
|
||||
NEXT n
|
||||
|
||||
QOut( "No production" )
|
||||
|
||||
for n:=1 to 10 step -1
|
||||
QOut( n )
|
||||
next n
|
||||
FOR n := 1 TO 10 step - 1
|
||||
QOut( n )
|
||||
NEXT n
|
||||
|
||||
QOut( "Ok!" )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour For Next loops for Clipper compatibility
|
||||
|
||||
@@ -9,58 +9,59 @@
|
||||
|
||||
// TODO: add test for "step 0"
|
||||
|
||||
static snFrom
|
||||
static snTo
|
||||
static snStep
|
||||
STATIC snFrom
|
||||
STATIC snTo
|
||||
STATIC snStep
|
||||
|
||||
function Main()
|
||||
local array
|
||||
local tmp, n
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL array
|
||||
LOCAL tmp, n
|
||||
|
||||
QOut( "Testing Harbour For Next loops." )
|
||||
|
||||
array := {{ 1, 10, 1 },;
|
||||
{ 10, 1, -1 },;
|
||||
{ 1, 10, -1 },;
|
||||
{ 10, 1, 1 },;
|
||||
{ 1, 10, 4 },;
|
||||
{ 10, 1, -4 },;
|
||||
{ 1, 10, -4 },;
|
||||
{ 10, 1, 4 }}
|
||||
array := { { 1, 10, 1 }, ;
|
||||
{ 10, 1, - 1 }, ;
|
||||
{ 1, 10, - 1 }, ;
|
||||
{ 10, 1, 1 }, ;
|
||||
{ 1, 10, 4 }, ;
|
||||
{ 10, 1, - 4 }, ;
|
||||
{ 1, 10, - 4 }, ;
|
||||
{ 10, 1, 4 } }
|
||||
|
||||
for tmp := 1 TO Len(array)
|
||||
FOR tmp := 1 TO Len( array )
|
||||
|
||||
snFrom := array[tmp][1]
|
||||
snTo := array[tmp][2]
|
||||
snStep := array[tmp][3]
|
||||
|
||||
OutStd( "From: ") ; OutStd(snFrom)
|
||||
OutStd(" To: ") ; OutStd(snTo)
|
||||
OutStd(" Step: ") ; OutStd(snStep)
|
||||
OutStd(Chr(13) + Chr(10))
|
||||
OutStd( "From: " ) ; OutStd( snFrom )
|
||||
OutStd( " To: " ) ; OutStd( snTo )
|
||||
OutStd( " Step: " ) ; OutStd( snStep )
|
||||
OutStd( Chr( 13 ) + Chr( 10 ) )
|
||||
|
||||
for n := Eval({|| ValFrom() }) to Eval({|| ValTo() }) step Eval({|| ValStep() })
|
||||
OutStd("Exec ") ; OutStd(n) ; OutStd(Chr(13) + Chr(10))
|
||||
next n
|
||||
FOR n := Eval( { || ValFrom() } ) TO Eval( { || ValTo() } ) STEP Eval( { || ValStep() } )
|
||||
OutStd( "Exec " ) ; OutStd( n ) ; OutStd( Chr( 13 ) + Chr( 10 ) )
|
||||
NEXT n
|
||||
|
||||
next
|
||||
NEXT
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
static function ValFrom()
|
||||
STATIC FUNCTION ValFrom()
|
||||
|
||||
OutStd("From") ; OutStd(Chr(13) + Chr(10))
|
||||
OutStd( "From" ) ; OutStd( Chr( 13 ) + Chr( 10 ) )
|
||||
|
||||
return snFrom
|
||||
RETURN snFrom
|
||||
|
||||
static function ValTo()
|
||||
STATIC FUNCTION ValTo()
|
||||
|
||||
OutStd("To") ; OutStd(Chr(13) + Chr(10))
|
||||
OutStd( "To" ) ; OutStd( Chr( 13 ) + Chr( 10 ) )
|
||||
|
||||
return snTo
|
||||
RETURN snTo
|
||||
|
||||
static function ValStep()
|
||||
STATIC FUNCTION ValStep()
|
||||
|
||||
OutStd("Step") ; OutStd(Chr(13) + Chr(10))
|
||||
OutStd( "Step" ) ; OutStd( Chr( 13 ) + Chr( 10 ) )
|
||||
|
||||
return snStep
|
||||
RETURN snStep
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
//
|
||||
// Function Array syntax test
|
||||
@@ -11,9 +11,9 @@
|
||||
// Placed in the public domain
|
||||
//
|
||||
|
||||
Function Main
|
||||
PROCEDURE Main()
|
||||
|
||||
local a
|
||||
LOCAL a
|
||||
|
||||
QOut( "Direct reference : ", aFunc()[1] )
|
||||
|
||||
@@ -26,9 +26,9 @@ Function Main
|
||||
aFunc()[1] := 4
|
||||
QOut( "Assign 4 : ", aFunc()[1] )
|
||||
|
||||
QOut( "Post increment : ", aFunc()[1]++ )
|
||||
QOut( "Post increment : ", aFunc()[1] ++ )
|
||||
QOut( "After : ", aFunc()[1] )
|
||||
QOut( "Pre decrement : ", --aFunc()[1] )
|
||||
QOut( "Pre decrement : ", -- aFunc()[1] )
|
||||
QOut( "After : ", aFunc()[1] )
|
||||
|
||||
aFunc()[1] += 2
|
||||
@@ -50,13 +50,14 @@ Function Main
|
||||
QOut( "To the power 3 : ", aFunc()[1] )
|
||||
|
||||
QOut( "Global stack" )
|
||||
Debug( __dbgvmStkGList() ) // Please note a is a reference to aArray !
|
||||
QOut( "Statics")
|
||||
Debug( __dbgvmVarSList() )
|
||||
return NIL
|
||||
Debug( __dbgVMStkGList() ) // Please note a is a reference to aArray !
|
||||
QOut( "Statics" )
|
||||
Debug( __dbgVMVarSList() )
|
||||
|
||||
Function aFunc()
|
||||
RETURN
|
||||
|
||||
static aArray := { [Test] }
|
||||
FUNCTION aFunc()
|
||||
|
||||
return aArray
|
||||
STATIC aArray := { [Test] }
|
||||
|
||||
RETURN aArray
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#define WELCOME "Welcome to the World of Harbour multiplatform Graphics!"
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL nFontHeight, nFontWidth
|
||||
LOCAL nTop, nLeft, nHeight, nWidth, nColor, nSec := Seconds()
|
||||
@@ -88,7 +88,7 @@ FUNCTION Main()
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
FUNCTION PutFrame( nTop, nLeft, nBottom, nRight, nColor1, nColor2 )
|
||||
|
||||
|
||||
@@ -24,63 +24,68 @@ REQUEST HB_CODEPAGE_PLISO
|
||||
REQUEST HB_CODEPAGE_PL852
|
||||
REQUEST HB_CODEPAGE_PLWIN
|
||||
|
||||
function main( cTermCP, cHostCP, lBoxChar )
|
||||
local i, j, x
|
||||
PROCEDURE Main( cTermCP, cHostCP, lBoxChar )
|
||||
|
||||
if empty( cTermCP )
|
||||
cTermCP := "PLISO"
|
||||
else
|
||||
cTermCP := upper( cTermCP )
|
||||
endif
|
||||
if empty( cHostCP )
|
||||
cHostCP := "PLMAZ"
|
||||
else
|
||||
cHostCP := upper( cHostCP )
|
||||
endif
|
||||
lBoxChar := !empty( lBoxChar )
|
||||
LOCAL i, j, x
|
||||
|
||||
HB_GTINFO( HB_GTI_FONTNAME, "fixed" )
|
||||
HB_GTINFO( HB_GTI_FONTWIDTH, 9 )
|
||||
HB_GTINFO( HB_GTI_FONTSIZE, 20 )
|
||||
IF Empty( cTermCP )
|
||||
cTermCP := "PLISO"
|
||||
ELSE
|
||||
cTermCP := Upper( cTermCP )
|
||||
ENDIF
|
||||
IF Empty( cHostCP )
|
||||
cHostCP := "PLMAZ"
|
||||
ELSE
|
||||
cHostCP := Upper( cHostCP )
|
||||
ENDIF
|
||||
lBoxChar := !Empty( lBoxChar )
|
||||
|
||||
HB_SETTERMCP( cTermCP, cHostCP, lBoxChar )
|
||||
hb_gtInfo( HB_GTI_FONTNAME, "fixed" )
|
||||
hb_gtInfo( HB_GTI_FONTWIDTH, 9 )
|
||||
hb_gtInfo( HB_GTI_FONTSIZE, 20 )
|
||||
|
||||
? OS(), VERSION(), DATE(), TIME()
|
||||
? HB_GTVERSION(), HB_GTVERSION(1)
|
||||
? "Host codpage: " + cHostCP + ", terminal codepage: " + cTermCP
|
||||
?
|
||||
hb_SetTermCP( cTermCP, cHostCP, lBoxChar )
|
||||
|
||||
//HB_GTINFO(HB_GTI_COMPATBUFFER,.f.)
|
||||
?
|
||||
for i := 0 to 15
|
||||
for j := 0 to 15
|
||||
x := i * 16 + j
|
||||
dispout( " " + chr( x ) )
|
||||
next
|
||||
?
|
||||
next
|
||||
inkey(0)
|
||||
?; dspboxch( "ÚÄÂÄ¿ ÉÍËÍ» ÕÍÑ͸ ÖÄÒÄ· ÜÜÜ °±²Û ° ± ² Û" )
|
||||
?; dspboxch( "³ ³ ³ º º º ÃÄÅÄ´ ÇÄ×Ķ ÝþÞ" )
|
||||
?; dspboxch( "ÃÄÅÄ´ ÌÍÎ͹ ³ ³ ³ º º º ÝÛÞ ÛþÛ" )
|
||||
?; dspboxch( "³ ³ ³ º º º ÆÍØÍµ ÌÍÎ͹ ÝþÞ" )
|
||||
?; dspboxch( "ÀÄÁÄÙ ÈÍÊͼ ÔÍÏ; ÓÄÐĽ ßßß û ® ¯" )
|
||||
?
|
||||
? "ISO-8859-2: say[ " + POL_ISO + " ]"; dspboxch( ", box[ " + POL_ISO + " ]" )
|
||||
? " Mazovia: say[ " + POL_MAZ + " ]"; dspboxch( ", box[ " + POL_MAZ + " ]" )
|
||||
? " CP-1250: say[ " + POL_WIN + " ]"; dspboxch( ", box[ " + POL_WIN + " ]" )
|
||||
? " CP-852: say[ " + POL_852 + " ]"; dspboxch( ", box[ " + POL_852 + " ]" )
|
||||
? chr(4)+chr(16)+chr(17)+chr(24)+chr(25)+chr(26)+chr(27)+chr(30)+chr(31)
|
||||
HB_GTINFO(HB_GTI_ESCDELAY,5)
|
||||
inkey(0)
|
||||
alert("ALERT BOX")
|
||||
return nil
|
||||
? OS(), Version(), Date(), Time()
|
||||
? hb_gtVersion(), hb_gtVersion( 1 )
|
||||
? "Host codpage: " + cHostCP + ", terminal codepage: " + cTermCP
|
||||
?
|
||||
|
||||
function dspboxch( cStr )
|
||||
local i, r, c
|
||||
for i := 1 to len( cStr )
|
||||
r:=row(); c:=col()
|
||||
dispbox( r, c, r, c, substr( cStr, i, 1 ) )
|
||||
setpos(r,c+1)
|
||||
next
|
||||
return nil
|
||||
//HB_GTINFO(HB_GTI_COMPATBUFFER,.f.)
|
||||
?
|
||||
FOR i := 0 TO 15
|
||||
FOR j := 0 TO 15
|
||||
x := i * 16 + j
|
||||
DispOut( " " + Chr( x ) )
|
||||
NEXT
|
||||
?
|
||||
NEXT
|
||||
Inkey( 0 )
|
||||
?; dspboxch( "ÚÄÂÄ¿ ÉÍËÍ» ÕÍÑ͸ ÖÄÒÄ· ÜÜÜ °±²Û ° ± ² Û" )
|
||||
?; dspboxch( "³ ³ ³ º º º ÃÄÅÄ´ ÇÄ×Ķ ÝþÞ" )
|
||||
?; dspboxch( "ÃÄÅÄ´ ÌÍÎ͹ ³ ³ ³ º º º ÝÛÞ ÛþÛ" )
|
||||
?; dspboxch( "³ ³ ³ º º º ÆÍØÍµ ÌÍÎ͹ ÝþÞ" )
|
||||
?; dspboxch( "ÀÄÁÄÙ ÈÍÊͼ ÔÍÏ; ÓÄÐĽ ßßß û ® ¯" )
|
||||
?
|
||||
? "ISO-8859-2: say[ " + POL_ISO + " ]"; dspboxch( ", box[ " + POL_ISO + " ]" )
|
||||
? " Mazovia: say[ " + POL_MAZ + " ]"; dspboxch( ", box[ " + POL_MAZ + " ]" )
|
||||
? " CP-1250: say[ " + POL_WIN + " ]"; dspboxch( ", box[ " + POL_WIN + " ]" )
|
||||
? " CP-852: say[ " + POL_852 + " ]"; dspboxch( ", box[ " + POL_852 + " ]" )
|
||||
? Chr( 4 ) + Chr( 16 ) + Chr( 17 ) + Chr( 24 ) + Chr( 25 ) + Chr( 26 ) + Chr( 27 ) + Chr( 30 ) + Chr( 31 )
|
||||
hb_gtInfo( HB_GTI_ESCDELAY, 5 )
|
||||
Inkey( 0 )
|
||||
Alert( "ALERT BOX" )
|
||||
|
||||
RETURN
|
||||
|
||||
FUNCTION dspboxch( cStr )
|
||||
|
||||
LOCAL i, r, c
|
||||
|
||||
FOR i := 1 TO Len( cStr )
|
||||
r := Row(); c := Col()
|
||||
DispBox( r, c, r, c, SubStr( cStr, i, 1 ) )
|
||||
SetPos( r, c + 1 )
|
||||
NEXT
|
||||
|
||||
RETURN nil
|
||||
|
||||
@@ -11,36 +11,43 @@
|
||||
*
|
||||
*/
|
||||
|
||||
function main( xBlink )
|
||||
local bg, fg, n
|
||||
PROCEDURE Main( xBlink )
|
||||
|
||||
CLS
|
||||
?
|
||||
? OS(), VERSION(), DATE(), TIME()
|
||||
? HB_GTVERSION(), HB_GTVERSION(1)
|
||||
?
|
||||
inkey( 0 )
|
||||
setblink( empty( xBlink ) )
|
||||
for bg := 0 to 15
|
||||
for fg := 0 to 15
|
||||
n := bg * 16 + fg
|
||||
@ 5 + bg, 5 + fg * 4 say "["+NUM2HEX(n)+"]" color NTOCOLOR( n )
|
||||
next
|
||||
next
|
||||
?
|
||||
?
|
||||
while inkey(0)!=13; enddo
|
||||
return nil
|
||||
LOCAL bg, fg, n
|
||||
|
||||
static function NTOCOLOR(nClr)
|
||||
return ltrim( str( int( nClr % 16 ), 2 ) ) + "/" + ;
|
||||
ltrim( str( int( nClr / 16 ), 2 ) )
|
||||
CLS
|
||||
?
|
||||
? OS(), Version(), Date(), Time()
|
||||
? hb_gtVersion(), hb_gtVersion( 1 )
|
||||
?
|
||||
Inkey( 0 )
|
||||
SetBlink( Empty( xBlink ) )
|
||||
FOR bg := 0 TO 15
|
||||
FOR fg := 0 TO 15
|
||||
n := bg * 16 + fg
|
||||
@ 5 + bg, 5 + fg * 4 SAY "[" + NUM2HEX( n ) + "]" COLOR NTOCOLOR( n )
|
||||
NEXT
|
||||
NEXT
|
||||
?
|
||||
?
|
||||
WHILE Inkey( 0 ) != 13
|
||||
ENDDO
|
||||
|
||||
static function NUM2HEX(nVal)
|
||||
local cHex := "", i, n
|
||||
for i := 1 to 2
|
||||
n := nVal % 16
|
||||
cHex := chr( n + iif( n > 9, 55, 48 ) ) + cHex
|
||||
nVal := int( nVal / 16 )
|
||||
next
|
||||
return cHex
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION NTOCOLOR( nClr )
|
||||
|
||||
RETURN LTrim( Str( Int( nClr % 16 ), 2 ) ) + "/" + ;
|
||||
LTrim( Str( Int( nClr / 16 ), 2 ) )
|
||||
|
||||
STATIC FUNCTION NUM2HEX( nVal )
|
||||
|
||||
LOCAL cHex := "", i, n
|
||||
|
||||
FOR i := 1 TO 2
|
||||
n := nVal % 16
|
||||
cHex := Chr( n + iif( n > 9, 55, 48 ) ) + cHex
|
||||
nVal := Int( nVal / 16 )
|
||||
NEXT
|
||||
|
||||
RETURN cHex
|
||||
|
||||
@@ -21,274 +21,277 @@ REQUEST HB_CODEPAGE_PL852
|
||||
REQUEST HB_CODEPAGE_PLWIN
|
||||
#endif
|
||||
|
||||
function main( cTermCP, cHostCP, lBoxChar )
|
||||
local k, i, s
|
||||
local aKeys := { ;
|
||||
{ "K_UP", 5, "Up arrow, Ctrl-E" }, ;
|
||||
{ "K_DOWN", 24, "Down arrow, Ctrl-X" }, ;
|
||||
{ "K_LEFT", 19, "Left arrow, Ctrl-S" }, ;
|
||||
{ "K_RIGHT", 4, "Right arrow, Ctrl-D" }, ;
|
||||
{ "K_HOME", 1, "Home, Ctrl-A" }, ;
|
||||
{ "K_END", 6, "End, Ctrl-F" }, ;
|
||||
{ "K_PGUP", 18, "PgUp, Ctrl-R" }, ;
|
||||
{ "K_PGDN", 3, "PgDn, Ctrl-C" }, ;
|
||||
{ "K_CTRL_UP", 397, "Ctrl-Up arrow" }, ;
|
||||
{ "K_CTRL_DOWN", 401, "Ctrl-Down arrow" }, ;
|
||||
{ "K_CTRL_LEFT", 26, "Ctrl-Left arrow, Ctrl-Z" }, ;
|
||||
{ "K_CTRL_RIGHT", 2, "Ctrl-Right arrow, Ctrl-B" }, ;
|
||||
{ "K_CTRL_HOME", 29, "Ctrl-Home, Ctrl-]" }, ;
|
||||
{ "K_CTRL_END", 23, "Ctrl-End, Ctrl-W" }, ;
|
||||
{ "K_CTRL_PGUP", 31, "Ctrl-PgUp, Ctrl-Hyphen" }, ;
|
||||
{ "K_CTRL_PGDN", 30, "Ctrl-PgDn, Ctrl-^" }, ;
|
||||
{ "K_ALT_UP", 408, "Alt-Up arrow" }, ;
|
||||
{ "K_ALT_DOWN", 416, "Alt-Down arrow" }, ;
|
||||
{ "K_ALT_LEFT", 411, "Alt-Left arrow" }, ;
|
||||
{ "K_ALT_RIGHT", 413, "Alt-Right arrow" }, ;
|
||||
{ "K_ALT_HOME", 407, "Alt-Home" }, ;
|
||||
{ "K_ALT_END", 415, "Alt-End" }, ;
|
||||
{ "K_ALT_PGUP", 409, "Alt-PgUp" }, ;
|
||||
{ "K_ALT_PGDN", 417, "Alt-PgDn" }, ;
|
||||
{ "K_ENTER", 13, "Enter, Ctrl-M" }, ;
|
||||
{ "K_RETURN", 13, "Return, Ctrl-M" }, ;
|
||||
{ "K_SPACE", 32, "Space bar" }, ;
|
||||
{ "K_ESC", 27, "Esc, Ctrl-[" }, ;
|
||||
{ "K_CTRL_ENTER", 10, "Ctrl-Enter" }, ;
|
||||
{ "K_CTRL_RETURN", 10, "Ctrl-Return" }, ;
|
||||
{ "K_CTRL_RET", 10, "Ctrl-Return (Compat.)" }, ;
|
||||
{ "K_CTRL_PRTSCR", 379, "Ctrl-Print Screen" }, ;
|
||||
{ "K_CTRL_QUESTION", 309, "Ctrl-?" }, ;
|
||||
{ "K_ALT_ENTER", 284, "Alt-Enter" }, ;
|
||||
{ "K_ALT_RETURN", 284, "Alt-Return" }, ;
|
||||
{ "K_ALT_EQUALS", 387, "Alt-Equals" }, ;
|
||||
{ "K_ALT_ESC", 257, "Alt-Esc" }, ;
|
||||
{ "KP_CENTER", 332, "Keypad CENTER (5)" }, ;
|
||||
{ "KP_ALT_ENTER", 422, "Keypad Alt-Enter" }, ;
|
||||
{ "KP_CTRL_5", 399, "Keypad Ctrl-5" }, ;
|
||||
{ "KP_CTRL_SLASH", 405, "Keypad Ctrl-/" }, ;
|
||||
{ "KP_CTRL_ASTERISK", 406, "Keypad Ctrl-*" }, ;
|
||||
{ "KP_CTRL_MINUS", 398, "Keypad Ctrl--" }, ;
|
||||
{ "KP_CTRL_PLUS", 400, "Keypad Ctrl-+" }, ;
|
||||
{ "KP_ALT_5", 5, "Keypad Alt-5" }, ;
|
||||
{ "KP_ALT_SLASH", 420, "Keypad Alt-/" }, ;
|
||||
{ "KP_ALT_ASTERISK", 311, "Keypad Alt-*" }, ;
|
||||
{ "KP_ALT_MINUS", 330, "Keypad Alt--" }, ;
|
||||
{ "KP_ALT_PLUS", 334, "Keypad Alt-+" }, ;
|
||||
{ "K_INS", 22, "Ins, Ctrl-V" }, ;
|
||||
{ "K_DEL", 7, "Del, Ctrl-G" }, ;
|
||||
{ "K_BS", 8, "Backspace, Ctrl-H" }, ;
|
||||
{ "K_TAB", 9, "Tab, Ctrl-I" }, ;
|
||||
{ "K_SH_TAB", 271, "Shift-Tab" }, ;
|
||||
{ "K_CTRL_INS", 402, "Ctrl-Ins" }, ;
|
||||
{ "K_CTRL_DEL", 403, "Ctrl-Del" }, ;
|
||||
{ "K_CTRL_BS", 127, "Ctrl-Backspace" }, ;
|
||||
{ "K_CTRL_TAB", 404, "Ctrl-Tab" }, ;
|
||||
{ "K_ALT_INS", 418, "Alt-Ins" }, ;
|
||||
{ "K_ALT_DEL", 419, "Alt-Del" }, ;
|
||||
{ "K_ALT_BS", 270, "Alt-Backspace" }, ;
|
||||
{ "K_ALT_TAB", 421, "Alt-Tab" }, ;
|
||||
{ "K_CTRL_A", 1, "Ctrl-A, Home" }, ;
|
||||
{ "K_CTRL_B", 2, "Ctrl-B, Ctrl-Right arrow" }, ;
|
||||
{ "K_CTRL_C", 3, "Ctrl-C, PgDn, Ctrl-ScrollLock" }, ;
|
||||
{ "K_CTRL_D", 4, "Ctrl-D, Right arrow" }, ;
|
||||
{ "K_CTRL_E", 5, "Ctrl-E, Up arrow" }, ;
|
||||
{ "K_CTRL_F", 6, "Ctrl-F, End" }, ;
|
||||
{ "K_CTRL_G", 7, "Ctrl-G, Del" }, ;
|
||||
{ "K_CTRL_H", 8, "Ctrl-H, Backspace" }, ;
|
||||
{ "K_CTRL_I", 9, "Ctrl-I, Tab" }, ;
|
||||
{ "K_CTRL_J", 10, "Ctrl-J" }, ;
|
||||
{ "K_CTRL_K", 11, "Ctrl-K" }, ;
|
||||
{ "K_CTRL_L", 12, "Ctrl-L" }, ;
|
||||
{ "K_CTRL_M", 13, "Ctrl-M, Return" }, ;
|
||||
{ "K_CTRL_N", 14, "Ctrl-N" }, ;
|
||||
{ "K_CTRL_O", 15, "Ctrl-O" }, ;
|
||||
{ "K_CTRL_P", 16, "Ctrl-P" }, ;
|
||||
{ "K_CTRL_Q", 17, "Ctrl-Q" }, ;
|
||||
{ "K_CTRL_R", 18, "Ctrl-R, PgUp" }, ;
|
||||
{ "K_CTRL_S", 19, "Ctrl-S, Left arrow" }, ;
|
||||
{ "K_CTRL_T", 20, "Ctrl-T" }, ;
|
||||
{ "K_CTRL_U", 21, "Ctrl-U" }, ;
|
||||
{ "K_CTRL_V", 22, "Ctrl-V, Ins" }, ;
|
||||
{ "K_CTRL_W", 23, "Ctrl-W, Ctrl-End" }, ;
|
||||
{ "K_CTRL_X", 24, "Ctrl-X, Down arrow" }, ;
|
||||
{ "K_CTRL_Y", 25, "Ctrl-Y" }, ;
|
||||
{ "K_CTRL_Z", 26, "Ctrl-Z, Ctrl-Left arrow" } }
|
||||
aadd(aKeys, { "K_ALT_A", 286, "Alt-A" } )
|
||||
aadd(aKeys, { "K_ALT_B", 304, "Alt-B" } )
|
||||
aadd(aKeys, { "K_ALT_C", 302, "Alt-C" } )
|
||||
aadd(aKeys, { "K_ALT_D", 288, "Alt-D" } )
|
||||
aadd(aKeys, { "K_ALT_E", 274, "Alt-E" } )
|
||||
aadd(aKeys, { "K_ALT_F", 289, "Alt-F" } )
|
||||
aadd(aKeys, { "K_ALT_G", 290, "Alt-G" } )
|
||||
aadd(aKeys, { "K_ALT_H", 291, "Alt-H" } )
|
||||
aadd(aKeys, { "K_ALT_I", 279, "Alt-I" } )
|
||||
aadd(aKeys, { "K_ALT_J", 292, "Alt-J" } )
|
||||
aadd(aKeys, { "K_ALT_K", 293, "Alt-K" } )
|
||||
aadd(aKeys, { "K_ALT_L", 294, "Alt-L" } )
|
||||
aadd(aKeys, { "K_ALT_M", 306, "Alt-M" } )
|
||||
aadd(aKeys, { "K_ALT_N", 305, "Alt-N" } )
|
||||
aadd(aKeys, { "K_ALT_O", 280, "Alt-O" } )
|
||||
aadd(aKeys, { "K_ALT_P", 281, "Alt-P" } )
|
||||
aadd(aKeys, { "K_ALT_Q", 272, "Alt-Q" } )
|
||||
aadd(aKeys, { "K_ALT_R", 275, "Alt-R" } )
|
||||
aadd(aKeys, { "K_ALT_S", 287, "Alt-S" } )
|
||||
aadd(aKeys, { "K_ALT_T", 276, "Alt-T" } )
|
||||
aadd(aKeys, { "K_ALT_U", 278, "Alt-U" } )
|
||||
aadd(aKeys, { "K_ALT_V", 303, "Alt-V" } )
|
||||
aadd(aKeys, { "K_ALT_W", 273, "Alt-W" } )
|
||||
aadd(aKeys, { "K_ALT_X", 301, "Alt-X" } )
|
||||
aadd(aKeys, { "K_ALT_Y", 277, "Alt-Y" } )
|
||||
aadd(aKeys, { "K_ALT_Z", 300, "Alt-Z" } )
|
||||
aadd(aKeys, { "K_ALT_1", 376, "Alt-1" } )
|
||||
aadd(aKeys, { "K_ALT_2", 377, "Alt-2" } )
|
||||
aadd(aKeys, { "K_ALT_3", 378, "Alt-3" } )
|
||||
aadd(aKeys, { "K_ALT_4", 379, "Alt-4" } )
|
||||
aadd(aKeys, { "K_ALT_5", 380, "Alt-5" } )
|
||||
aadd(aKeys, { "K_ALT_6", 381, "Alt-6" } )
|
||||
aadd(aKeys, { "K_ALT_7", 382, "Alt-7" } )
|
||||
aadd(aKeys, { "K_ALT_8", 383, "Alt-8" } )
|
||||
aadd(aKeys, { "K_ALT_9", 384, "Alt-9" } )
|
||||
aadd(aKeys, { "K_ALT_0", 385, "Alt-0" } )
|
||||
aadd(aKeys, { "K_F1", 28, "F1, Ctrl-Backslash" } )
|
||||
aadd(aKeys, { "K_F2", -1, "F2" } )
|
||||
aadd(aKeys, { "K_F3", -2, "F3" } )
|
||||
aadd(aKeys, { "K_F4", -3, "F4" } )
|
||||
aadd(aKeys, { "K_F5", -4, "F5" } )
|
||||
aadd(aKeys, { "K_F6", -5, "F6" } )
|
||||
aadd(aKeys, { "K_F7", -6, "F7" } )
|
||||
aadd(aKeys, { "K_F8", -7, "F8" } )
|
||||
aadd(aKeys, { "K_F9", -8, "F9" } )
|
||||
aadd(aKeys, { "K_F10", -9, "F10" } )
|
||||
aadd(aKeys, { "K_F11", -40, "F11" } )
|
||||
aadd(aKeys, { "K_F12", -41, "F12" } )
|
||||
aadd(aKeys, { "K_CTRL_F1", -20, "Ctrl-F1" } )
|
||||
aadd(aKeys, { "K_CTRL_F2", -21, "Ctrl-F2" } )
|
||||
aadd(aKeys, { "K_CTRL_F3", -22, "Ctrl-F4" } )
|
||||
aadd(aKeys, { "K_CTRL_F4", -23, "Ctrl-F3" } )
|
||||
aadd(aKeys, { "K_CTRL_F5", -24, "Ctrl-F5" } )
|
||||
aadd(aKeys, { "K_CTRL_F6", -25, "Ctrl-F6" } )
|
||||
aadd(aKeys, { "K_CTRL_F7", -26, "Ctrl-F7" } )
|
||||
aadd(aKeys, { "K_CTRL_F8", -27, "Ctrl-F8" } )
|
||||
aadd(aKeys, { "K_CTRL_F9", -28, "Ctrl-F9" } )
|
||||
aadd(aKeys, { "K_CTRL_F10", -29, "Ctrl-F10" } )
|
||||
aadd(aKeys, { "K_CTRL_F11", -44, "Ctrl-F11" } )
|
||||
aadd(aKeys, { "K_CTRL_F12", -45, "Ctrl-F12" } )
|
||||
aadd(aKeys, { "K_ALT_F1", -30, "Alt-F1" } )
|
||||
aadd(aKeys, { "K_ALT_F2", -31, "Alt-F2" } )
|
||||
aadd(aKeys, { "K_ALT_F3", -32, "Alt-F3" } )
|
||||
aadd(aKeys, { "K_ALT_F4", -33, "Alt-F4" } )
|
||||
aadd(aKeys, { "K_ALT_F5", -34, "Alt-F5" } )
|
||||
aadd(aKeys, { "K_ALT_F6", -35, "Alt-F6" } )
|
||||
aadd(aKeys, { "K_ALT_F7", -36, "Alt-F7" } )
|
||||
aadd(aKeys, { "K_ALT_F8", -37, "Alt-F8" } )
|
||||
aadd(aKeys, { "K_ALT_F9", -38, "Alt-F9" } )
|
||||
aadd(aKeys, { "K_ALT_F10", -39, "Alt-F10" } )
|
||||
aadd(aKeys, { "K_ALT_F11", -46, "Alt-F11" } )
|
||||
aadd(aKeys, { "K_ALT_F12", -47, "Alt-F12" } )
|
||||
aadd(aKeys, { "K_SH_F1", -10, "Shift-F1" } )
|
||||
aadd(aKeys, { "K_SH_F2", -11, "Shift-F2" } )
|
||||
aadd(aKeys, { "K_SH_F3", -12, "Shift-F3" } )
|
||||
aadd(aKeys, { "K_SH_F4", -13, "Shift-F4" } )
|
||||
aadd(aKeys, { "K_SH_F5", -14, "Shift-F5" } )
|
||||
aadd(aKeys, { "K_SH_F6", -15, "Shift-F6" } )
|
||||
aadd(aKeys, { "K_SH_F7", -16, "Shift-F7" } )
|
||||
aadd(aKeys, { "K_SH_F8", -17, "Shift-F8" } )
|
||||
aadd(aKeys, { "K_SH_F9", -18, "Shift-F9" } )
|
||||
aadd(aKeys, { "K_SH_F10", -19, "Shift-F10" } )
|
||||
aadd(aKeys, { "K_SH_F11", -42, "Shift-F11" } )
|
||||
aadd(aKeys, { "K_SH_F12", -43, "Shift-F12" } )
|
||||
aadd(aKeys, { "K_MOUSEMOVE", 1001, "mouse move" } )
|
||||
aadd(aKeys, { "K_LBUTTONDOWN", 1002, "mouse left button down" } )
|
||||
aadd(aKeys, { "K_LBUTTONUP", 1003, "mouse left button up" } )
|
||||
aadd(aKeys, { "K_RBUTTONDOWN", 1004, "mouse right button down" } )
|
||||
aadd(aKeys, { "K_RBUTTONUP", 1005, "mouse right button up" } )
|
||||
aadd(aKeys, { "K_LDBLCLK", 1006, "mouse left button double click" } )
|
||||
aadd(aKeys, { "K_RDBLCLK", 1007, "mouse right button double click"} )
|
||||
aadd(aKeys, { "K_MBUTTONDOWN", 1008, "mouse middle button down" } )
|
||||
aadd(aKeys, { "K_MBUTTONUP", 1009, "mouse middle button up" } )
|
||||
aadd(aKeys, { "K_MDBLCLK", 1010, "mouse middle button double click" } )
|
||||
aadd(aKeys, { "K_MMLEFTDOWN", 1011, "Mouse Move Left Down" } )
|
||||
aadd(aKeys, { "K_MMRIGHTDOWN", 1012, "Mouse Move Right Down" } )
|
||||
aadd(aKeys, { "K_MMMIDDLEDOWN", 1013, "Mouse Move Middle Down" } )
|
||||
aadd(aKeys, { "K_MWFORWARD", 1014, "Mouse Wheel Forward" } )
|
||||
aadd(aKeys, { "K_MWBACKWARD", 1015, "Mouse Wheel Backward" } )
|
||||
aadd(aKeys, { "K_NCMOUSEMOVE", 1016, "Non-Client Area Mouse Movement" } )
|
||||
aadd(aKeys, { "HB_K_RESIZE", 1101, "screen dimension changed" } )
|
||||
aadd(aKeys, { "HB_K_CLOSE", 1102, "close button hit" } )
|
||||
aadd(aKeys, { "HB_K_GETFOCUS", 1103, "focus restored" } )
|
||||
aadd(aKeys, { "HB_K_LOSTFOCUS", 1104, "focus lost" } )
|
||||
aadd(aKeys, { "HB_K_CONNECT", 1105, "remote terminal connected" } )
|
||||
aadd(aKeys, { "HB_K_DISCONNECT", 1106, "remote terminal disconnected" } )
|
||||
PROCEDURE Main( cTermCP, cHostCP, lBoxChar )
|
||||
|
||||
LOCAL k, i, s
|
||||
LOCAL aKeys := { ;
|
||||
{ "K_UP", 5, "Up arrow, Ctrl-E" }, ;
|
||||
{ "K_DOWN", 24, "Down arrow, Ctrl-X" }, ;
|
||||
{ "K_LEFT", 19, "Left arrow, Ctrl-S" }, ;
|
||||
{ "K_RIGHT", 4, "Right arrow, Ctrl-D" }, ;
|
||||
{ "K_HOME", 1, "Home, Ctrl-A" }, ;
|
||||
{ "K_END", 6, "End, Ctrl-F" }, ;
|
||||
{ "K_PGUP", 18, "PgUp, Ctrl-R" }, ;
|
||||
{ "K_PGDN", 3, "PgDn, Ctrl-C" }, ;
|
||||
{ "K_CTRL_UP", 397, "Ctrl-Up arrow" }, ;
|
||||
{ "K_CTRL_DOWN", 401, "Ctrl-Down arrow" }, ;
|
||||
{ "K_CTRL_LEFT", 26, "Ctrl-Left arrow, Ctrl-Z" }, ;
|
||||
{ "K_CTRL_RIGHT", 2, "Ctrl-Right arrow, Ctrl-B" }, ;
|
||||
{ "K_CTRL_HOME", 29, "Ctrl-Home, Ctrl-]" }, ;
|
||||
{ "K_CTRL_END", 23, "Ctrl-End, Ctrl-W" }, ;
|
||||
{ "K_CTRL_PGUP", 31, "Ctrl-PgUp, Ctrl-Hyphen" }, ;
|
||||
{ "K_CTRL_PGDN", 30, "Ctrl-PgDn, Ctrl-^" }, ;
|
||||
{ "K_ALT_UP", 408, "Alt-Up arrow" }, ;
|
||||
{ "K_ALT_DOWN", 416, "Alt-Down arrow" }, ;
|
||||
{ "K_ALT_LEFT", 411, "Alt-Left arrow" }, ;
|
||||
{ "K_ALT_RIGHT", 413, "Alt-Right arrow" }, ;
|
||||
{ "K_ALT_HOME", 407, "Alt-Home" }, ;
|
||||
{ "K_ALT_END", 415, "Alt-End" }, ;
|
||||
{ "K_ALT_PGUP", 409, "Alt-PgUp" }, ;
|
||||
{ "K_ALT_PGDN", 417, "Alt-PgDn" }, ;
|
||||
{ "K_ENTER", 13, "Enter, Ctrl-M" }, ;
|
||||
{ "K_RETURN", 13, "Return, Ctrl-M" }, ;
|
||||
{ "K_SPACE", 32, "Space bar" }, ;
|
||||
{ "K_ESC", 27, "Esc, Ctrl-[" }, ;
|
||||
{ "K_CTRL_ENTER", 10, "Ctrl-Enter" }, ;
|
||||
{ "K_CTRL_RETURN", 10, "Ctrl-Return" }, ;
|
||||
{ "K_CTRL_RET", 10, "Ctrl-Return (Compat.)" }, ;
|
||||
{ "K_CTRL_PRTSCR", 379, "Ctrl-Print Screen" }, ;
|
||||
{ "K_CTRL_QUESTION", 309, "Ctrl-?" }, ;
|
||||
{ "K_ALT_ENTER", 284, "Alt-Enter" }, ;
|
||||
{ "K_ALT_RETURN", 284, "Alt-Return" }, ;
|
||||
{ "K_ALT_EQUALS", 387, "Alt-Equals" }, ;
|
||||
{ "K_ALT_ESC", 257, "Alt-Esc" }, ;
|
||||
{ "KP_CENTER", 332, "Keypad CENTER (5)" }, ;
|
||||
{ "KP_ALT_ENTER", 422, "Keypad Alt-Enter" }, ;
|
||||
{ "KP_CTRL_5", 399, "Keypad Ctrl-5" }, ;
|
||||
{ "KP_CTRL_SLASH", 405, "Keypad Ctrl-/" }, ;
|
||||
{ "KP_CTRL_ASTERISK", 406, "Keypad Ctrl-*" }, ;
|
||||
{ "KP_CTRL_MINUS", 398, "Keypad Ctrl--" }, ;
|
||||
{ "KP_CTRL_PLUS", 400, "Keypad Ctrl-+" }, ;
|
||||
{ "KP_ALT_5", 5, "Keypad Alt-5" }, ;
|
||||
{ "KP_ALT_SLASH", 420, "Keypad Alt-/" }, ;
|
||||
{ "KP_ALT_ASTERISK", 311, "Keypad Alt-*" }, ;
|
||||
{ "KP_ALT_MINUS", 330, "Keypad Alt--" }, ;
|
||||
{ "KP_ALT_PLUS", 334, "Keypad Alt-+" }, ;
|
||||
{ "K_INS", 22, "Ins, Ctrl-V" }, ;
|
||||
{ "K_DEL", 7, "Del, Ctrl-G" }, ;
|
||||
{ "K_BS", 8, "Backspace, Ctrl-H" }, ;
|
||||
{ "K_TAB", 9, "Tab, Ctrl-I" }, ;
|
||||
{ "K_SH_TAB", 271, "Shift-Tab" }, ;
|
||||
{ "K_CTRL_INS", 402, "Ctrl-Ins" }, ;
|
||||
{ "K_CTRL_DEL", 403, "Ctrl-Del" }, ;
|
||||
{ "K_CTRL_BS", 127, "Ctrl-Backspace" }, ;
|
||||
{ "K_CTRL_TAB", 404, "Ctrl-Tab" }, ;
|
||||
{ "K_ALT_INS", 418, "Alt-Ins" }, ;
|
||||
{ "K_ALT_DEL", 419, "Alt-Del" }, ;
|
||||
{ "K_ALT_BS", 270, "Alt-Backspace" }, ;
|
||||
{ "K_ALT_TAB", 421, "Alt-Tab" }, ;
|
||||
{ "K_CTRL_A", 1, "Ctrl-A, Home" }, ;
|
||||
{ "K_CTRL_B", 2, "Ctrl-B, Ctrl-Right arrow" }, ;
|
||||
{ "K_CTRL_C", 3, "Ctrl-C, PgDn, Ctrl-ScrollLock" }, ;
|
||||
{ "K_CTRL_D", 4, "Ctrl-D, Right arrow" }, ;
|
||||
{ "K_CTRL_E", 5, "Ctrl-E, Up arrow" }, ;
|
||||
{ "K_CTRL_F", 6, "Ctrl-F, End" }, ;
|
||||
{ "K_CTRL_G", 7, "Ctrl-G, Del" }, ;
|
||||
{ "K_CTRL_H", 8, "Ctrl-H, Backspace" }, ;
|
||||
{ "K_CTRL_I", 9, "Ctrl-I, Tab" }, ;
|
||||
{ "K_CTRL_J", 10, "Ctrl-J" }, ;
|
||||
{ "K_CTRL_K", 11, "Ctrl-K" }, ;
|
||||
{ "K_CTRL_L", 12, "Ctrl-L" }, ;
|
||||
{ "K_CTRL_M", 13, "Ctrl-M, Return" }, ;
|
||||
{ "K_CTRL_N", 14, "Ctrl-N" }, ;
|
||||
{ "K_CTRL_O", 15, "Ctrl-O" }, ;
|
||||
{ "K_CTRL_P", 16, "Ctrl-P" }, ;
|
||||
{ "K_CTRL_Q", 17, "Ctrl-Q" }, ;
|
||||
{ "K_CTRL_R", 18, "Ctrl-R, PgUp" }, ;
|
||||
{ "K_CTRL_S", 19, "Ctrl-S, Left arrow" }, ;
|
||||
{ "K_CTRL_T", 20, "Ctrl-T" }, ;
|
||||
{ "K_CTRL_U", 21, "Ctrl-U" }, ;
|
||||
{ "K_CTRL_V", 22, "Ctrl-V, Ins" }, ;
|
||||
{ "K_CTRL_W", 23, "Ctrl-W, Ctrl-End" }, ;
|
||||
{ "K_CTRL_X", 24, "Ctrl-X, Down arrow" }, ;
|
||||
{ "K_CTRL_Y", 25, "Ctrl-Y" }, ;
|
||||
{ "K_CTRL_Z", 26, "Ctrl-Z, Ctrl-Left arrow" } }
|
||||
|
||||
AAdd( aKeys, { "K_ALT_A", 286, "Alt-A" } )
|
||||
AAdd( aKeys, { "K_ALT_B", 304, "Alt-B" } )
|
||||
AAdd( aKeys, { "K_ALT_C", 302, "Alt-C" } )
|
||||
AAdd( aKeys, { "K_ALT_D", 288, "Alt-D" } )
|
||||
AAdd( aKeys, { "K_ALT_E", 274, "Alt-E" } )
|
||||
AAdd( aKeys, { "K_ALT_F", 289, "Alt-F" } )
|
||||
AAdd( aKeys, { "K_ALT_G", 290, "Alt-G" } )
|
||||
AAdd( aKeys, { "K_ALT_H", 291, "Alt-H" } )
|
||||
AAdd( aKeys, { "K_ALT_I", 279, "Alt-I" } )
|
||||
AAdd( aKeys, { "K_ALT_J", 292, "Alt-J" } )
|
||||
AAdd( aKeys, { "K_ALT_K", 293, "Alt-K" } )
|
||||
AAdd( aKeys, { "K_ALT_L", 294, "Alt-L" } )
|
||||
AAdd( aKeys, { "K_ALT_M", 306, "Alt-M" } )
|
||||
AAdd( aKeys, { "K_ALT_N", 305, "Alt-N" } )
|
||||
AAdd( aKeys, { "K_ALT_O", 280, "Alt-O" } )
|
||||
AAdd( aKeys, { "K_ALT_P", 281, "Alt-P" } )
|
||||
AAdd( aKeys, { "K_ALT_Q", 272, "Alt-Q" } )
|
||||
AAdd( aKeys, { "K_ALT_R", 275, "Alt-R" } )
|
||||
AAdd( aKeys, { "K_ALT_S", 287, "Alt-S" } )
|
||||
AAdd( aKeys, { "K_ALT_T", 276, "Alt-T" } )
|
||||
AAdd( aKeys, { "K_ALT_U", 278, "Alt-U" } )
|
||||
AAdd( aKeys, { "K_ALT_V", 303, "Alt-V" } )
|
||||
AAdd( aKeys, { "K_ALT_W", 273, "Alt-W" } )
|
||||
AAdd( aKeys, { "K_ALT_X", 301, "Alt-X" } )
|
||||
AAdd( aKeys, { "K_ALT_Y", 277, "Alt-Y" } )
|
||||
AAdd( aKeys, { "K_ALT_Z", 300, "Alt-Z" } )
|
||||
AAdd( aKeys, { "K_ALT_1", 376, "Alt-1" } )
|
||||
AAdd( aKeys, { "K_ALT_2", 377, "Alt-2" } )
|
||||
AAdd( aKeys, { "K_ALT_3", 378, "Alt-3" } )
|
||||
AAdd( aKeys, { "K_ALT_4", 379, "Alt-4" } )
|
||||
AAdd( aKeys, { "K_ALT_5", 380, "Alt-5" } )
|
||||
AAdd( aKeys, { "K_ALT_6", 381, "Alt-6" } )
|
||||
AAdd( aKeys, { "K_ALT_7", 382, "Alt-7" } )
|
||||
AAdd( aKeys, { "K_ALT_8", 383, "Alt-8" } )
|
||||
AAdd( aKeys, { "K_ALT_9", 384, "Alt-9" } )
|
||||
AAdd( aKeys, { "K_ALT_0", 385, "Alt-0" } )
|
||||
AAdd( aKeys, { "K_F1", 28, "F1, Ctrl-Backslash" } )
|
||||
AAdd( aKeys, { "K_F2", - 1, "F2" } )
|
||||
AAdd( aKeys, { "K_F3", - 2, "F3" } )
|
||||
AAdd( aKeys, { "K_F4", - 3, "F4" } )
|
||||
AAdd( aKeys, { "K_F5", - 4, "F5" } )
|
||||
AAdd( aKeys, { "K_F6", - 5, "F6" } )
|
||||
AAdd( aKeys, { "K_F7", - 6, "F7" } )
|
||||
AAdd( aKeys, { "K_F8", - 7, "F8" } )
|
||||
AAdd( aKeys, { "K_F9", - 8, "F9" } )
|
||||
AAdd( aKeys, { "K_F10", - 9, "F10" } )
|
||||
AAdd( aKeys, { "K_F11", - 40, "F11" } )
|
||||
AAdd( aKeys, { "K_F12", - 41, "F12" } )
|
||||
AAdd( aKeys, { "K_CTRL_F1", - 20, "Ctrl-F1" } )
|
||||
AAdd( aKeys, { "K_CTRL_F2", - 21, "Ctrl-F2" } )
|
||||
AAdd( aKeys, { "K_CTRL_F3", - 22, "Ctrl-F4" } )
|
||||
AAdd( aKeys, { "K_CTRL_F4", - 23, "Ctrl-F3" } )
|
||||
AAdd( aKeys, { "K_CTRL_F5", - 24, "Ctrl-F5" } )
|
||||
AAdd( aKeys, { "K_CTRL_F6", - 25, "Ctrl-F6" } )
|
||||
AAdd( aKeys, { "K_CTRL_F7", - 26, "Ctrl-F7" } )
|
||||
AAdd( aKeys, { "K_CTRL_F8", - 27, "Ctrl-F8" } )
|
||||
AAdd( aKeys, { "K_CTRL_F9", - 28, "Ctrl-F9" } )
|
||||
AAdd( aKeys, { "K_CTRL_F10", - 29, "Ctrl-F10" } )
|
||||
AAdd( aKeys, { "K_CTRL_F11", - 44, "Ctrl-F11" } )
|
||||
AAdd( aKeys, { "K_CTRL_F12", - 45, "Ctrl-F12" } )
|
||||
AAdd( aKeys, { "K_ALT_F1", - 30, "Alt-F1" } )
|
||||
AAdd( aKeys, { "K_ALT_F2", - 31, "Alt-F2" } )
|
||||
AAdd( aKeys, { "K_ALT_F3", - 32, "Alt-F3" } )
|
||||
AAdd( aKeys, { "K_ALT_F4", - 33, "Alt-F4" } )
|
||||
AAdd( aKeys, { "K_ALT_F5", - 34, "Alt-F5" } )
|
||||
AAdd( aKeys, { "K_ALT_F6", - 35, "Alt-F6" } )
|
||||
AAdd( aKeys, { "K_ALT_F7", - 36, "Alt-F7" } )
|
||||
AAdd( aKeys, { "K_ALT_F8", - 37, "Alt-F8" } )
|
||||
AAdd( aKeys, { "K_ALT_F9", - 38, "Alt-F9" } )
|
||||
AAdd( aKeys, { "K_ALT_F10", - 39, "Alt-F10" } )
|
||||
AAdd( aKeys, { "K_ALT_F11", - 46, "Alt-F11" } )
|
||||
AAdd( aKeys, { "K_ALT_F12", - 47, "Alt-F12" } )
|
||||
AAdd( aKeys, { "K_SH_F1", - 10, "Shift-F1" } )
|
||||
AAdd( aKeys, { "K_SH_F2", - 11, "Shift-F2" } )
|
||||
AAdd( aKeys, { "K_SH_F3", - 12, "Shift-F3" } )
|
||||
AAdd( aKeys, { "K_SH_F4", - 13, "Shift-F4" } )
|
||||
AAdd( aKeys, { "K_SH_F5", - 14, "Shift-F5" } )
|
||||
AAdd( aKeys, { "K_SH_F6", - 15, "Shift-F6" } )
|
||||
AAdd( aKeys, { "K_SH_F7", - 16, "Shift-F7" } )
|
||||
AAdd( aKeys, { "K_SH_F8", - 17, "Shift-F8" } )
|
||||
AAdd( aKeys, { "K_SH_F9", - 18, "Shift-F9" } )
|
||||
AAdd( aKeys, { "K_SH_F10", - 19, "Shift-F10" } )
|
||||
AAdd( aKeys, { "K_SH_F11", - 42, "Shift-F11" } )
|
||||
AAdd( aKeys, { "K_SH_F12", - 43, "Shift-F12" } )
|
||||
AAdd( aKeys, { "K_MOUSEMOVE", 1001, "mouse move" } )
|
||||
AAdd( aKeys, { "K_LBUTTONDOWN", 1002, "mouse left button down" } )
|
||||
AAdd( aKeys, { "K_LBUTTONUP", 1003, "mouse left button up" } )
|
||||
AAdd( aKeys, { "K_RBUTTONDOWN", 1004, "mouse right button down" } )
|
||||
AAdd( aKeys, { "K_RBUTTONUP", 1005, "mouse right button up" } )
|
||||
AAdd( aKeys, { "K_LDBLCLK", 1006, "mouse left button double click" } )
|
||||
AAdd( aKeys, { "K_RDBLCLK", 1007, "mouse right button double click" } )
|
||||
AAdd( aKeys, { "K_MBUTTONDOWN", 1008, "mouse middle button down" } )
|
||||
AAdd( aKeys, { "K_MBUTTONUP", 1009, "mouse middle button up" } )
|
||||
AAdd( aKeys, { "K_MDBLCLK", 1010, "mouse middle button double click" } )
|
||||
AAdd( aKeys, { "K_MMLEFTDOWN", 1011, "Mouse Move Left Down" } )
|
||||
AAdd( aKeys, { "K_MMRIGHTDOWN", 1012, "Mouse Move Right Down" } )
|
||||
AAdd( aKeys, { "K_MMMIDDLEDOWN", 1013, "Mouse Move Middle Down" } )
|
||||
AAdd( aKeys, { "K_MWFORWARD", 1014, "Mouse Wheel Forward" } )
|
||||
AAdd( aKeys, { "K_MWBACKWARD", 1015, "Mouse Wheel Backward" } )
|
||||
AAdd( aKeys, { "K_NCMOUSEMOVE", 1016, "Non-Client Area Mouse Movement" } )
|
||||
AAdd( aKeys, { "HB_K_RESIZE", 1101, "screen dimension changed" } )
|
||||
AAdd( aKeys, { "HB_K_CLOSE", 1102, "close button hit" } )
|
||||
AAdd( aKeys, { "HB_K_GETFOCUS", 1103, "focus restored" } )
|
||||
AAdd( aKeys, { "HB_K_LOSTFOCUS", 1104, "focus lost" } )
|
||||
AAdd( aKeys, { "HB_K_CONNECT", 1105, "remote terminal connected" } )
|
||||
AAdd( aKeys, { "HB_K_DISCONNECT", 1106, "remote terminal disconnected" } )
|
||||
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
set( _SET_EVENTMASK, HB_INKEY_ALL )
|
||||
//hb_gtInfo( HB_GTI_RESIZABLE, .f. )
|
||||
SET( _SET_EVENTMASK, HB_INKEY_ALL )
|
||||
//hb_gtInfo( HB_GTI_RESIZABLE, .F. )
|
||||
//hb_gtInfo( HB_GTI_RESIZEMODE, HB_GTI_RESIZEMODE_ROWS )
|
||||
//hb_gtInfo( HB_GTI_RESIZEMODE, HB_GTI_RESIZEMODE_FONT )
|
||||
hb_gtInfo( HB_GTI_ISFULLSCREEN, .T. )
|
||||
hb_gtInfo( HB_GTI_ALTENTER, .T. )
|
||||
hb_gtInfo( HB_GTI_CLOSABLE, .f. )
|
||||
hb_gtInfo( HB_GTI_CLOSABLE, .F. )
|
||||
hb_gtInfo( HB_GTI_ESCDELAY, 50 )
|
||||
if empty( cTermCP )
|
||||
IF Empty( cTermCP )
|
||||
cTermCP := "PLISO"
|
||||
else
|
||||
cTermCP := upper( cTermCP )
|
||||
endif
|
||||
if empty( cHostCP )
|
||||
ELSE
|
||||
cTermCP := Upper( cTermCP )
|
||||
ENDIF
|
||||
IF Empty( cHostCP )
|
||||
cHostCP := "PLMAZ"
|
||||
else
|
||||
cHostCP := upper( cHostCP )
|
||||
endif
|
||||
lBoxChar := !empty( lBoxChar )
|
||||
ELSE
|
||||
cHostCP := Upper( cHostCP )
|
||||
ENDIF
|
||||
lBoxChar := !Empty( lBoxChar )
|
||||
hb_cdpSelect( cHostCP )
|
||||
hb_setTermCP( cTermCP, cHostCP, lBoxChar )
|
||||
hb_SetTermCP( cTermCP, cHostCP, lBoxChar )
|
||||
#else
|
||||
#ifdef INKEY_ALL
|
||||
set( _SET_EVENTMASK, INKEY_ALL )
|
||||
#endif
|
||||
#ifdef INKEY_ALL
|
||||
SET( _SET_EVENTMASK, INKEY_ALL )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
mdblclk(250)
|
||||
setcancel(.f.)
|
||||
//altd(0)
|
||||
MDblClk( 250 )
|
||||
SetCancel( .F. )
|
||||
//altd(0)
|
||||
|
||||
? os(), version(), date(), time()
|
||||
? OS(), Version(), Date(), Time()
|
||||
#ifdef __HARBOUR__
|
||||
? hb_gtVersion(1), hb_gtVersion()
|
||||
? hb_gtVersion( 1 ), hb_gtVersion()
|
||||
? "Host codpage: " + hb_cdpSelect() + ", terminal codepage: " + cTermCP
|
||||
#endif
|
||||
? "@ - interrupt, keycodes checking: "
|
||||
?
|
||||
? "@ - interrupt, keycodes checking: "
|
||||
?
|
||||
|
||||
while (.t.)
|
||||
k:=inkey(0)
|
||||
if (i:=ascan(aKeys, { |x| x[2]==k }))!=0
|
||||
? " key:"+str(aKeys[i,2],7)+" "+padr(aKeys[i,1],18)+aKeys[i,3]
|
||||
elseif k>=32 .and. k<=126 .or. (k>=160 .and. k<=255) .or.;
|
||||
(k>=0 .and. k<=255 .and. IsAlpha(chr(k)))
|
||||
? "char:"+str(k,7)+" "+chr(k)
|
||||
else
|
||||
? " key:"+str(k,7)
|
||||
endif
|
||||
// ?? " ("+ltrim(str(maxrow()))+":"+ltrim(str(maxcol()))+")"
|
||||
WHILE .T.
|
||||
k := Inkey( 0 )
|
||||
IF ( i := AScan( aKeys, {| x | x[ 2 ] == k } ) ) != 0
|
||||
? " key:" + Str( aKeys[ i, 2 ], 7 ) + " " + PadR( aKeys[ i, 1 ], 18 ) + aKeys[ i, 3 ]
|
||||
ELSEIF k >= 32 .AND. k <= 126 .OR. ( k >= 160 .AND. k <= 255 ) .OR. ;
|
||||
( k >= 0 .AND. k <= 255 .AND. IsAlpha( Chr( k ) ) )
|
||||
? "char:" + Str( k, 7 ) + " " + Chr( k )
|
||||
ELSE
|
||||
? " key:" + Str( k, 7 )
|
||||
ENDIF
|
||||
// ?? " (" + ltrim( str( maxrow() ) ) + ":" + ltrim( str( maxcol() ) ) + ")"
|
||||
|
||||
if k==asc("@") .and. nextkey()==0
|
||||
exit
|
||||
IF k == Asc( "@" ) .AND. NextKey() == 0
|
||||
EXIT
|
||||
#ifdef __HARBOUR__
|
||||
elseif k==K_CTRL_INS
|
||||
if alert( "Would you like to show clipboard text?", { "YES", "NO" } ) == 1
|
||||
s := hb_gtInfo( HB_GTI_CLIPBOARDDATA )
|
||||
? "Clipboard text: [" + s + "]"
|
||||
endif
|
||||
elseif k==K_CTRL_END
|
||||
if alert( "Would you like to set clipboard text?", { "YES", "NO" } ) == 1
|
||||
s := hb_tstostr( hb_datetime() ) + hb_eol() + ;
|
||||
"Harbour " + hb_gtVersion() + " clipboard test" + hb_eol()
|
||||
? "New clipboard text: [" + s + "]"
|
||||
hb_gtInfo( HB_GTI_CLIPBOARDDATA, s )
|
||||
endif
|
||||
ELSEIF k == K_CTRL_INS
|
||||
IF Alert( "Would you like to show clipboard text?", { "YES", "NO" } ) == 1
|
||||
s := hb_gtInfo( HB_GTI_CLIPBOARDDATA )
|
||||
? "Clipboard text: [" + s + "]"
|
||||
ENDIF
|
||||
ELSEIF k == K_CTRL_END
|
||||
IF Alert( "Would you like to set clipboard text?", { "YES", "NO" } ) == 1
|
||||
s := hb_TSToStr( hb_DateTime() ) + hb_eol() + ;
|
||||
"Harbour " + hb_gtVersion() + " clipboard test" + hb_eol()
|
||||
? "New clipboard text: [" + s + "]"
|
||||
hb_gtInfo( HB_GTI_CLIPBOARDDATA, s )
|
||||
ENDIF
|
||||
#endif
|
||||
endif
|
||||
enddo
|
||||
?
|
||||
return nil
|
||||
ENDIF
|
||||
ENDDO
|
||||
?
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Typical welcome message
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
? "Hello world!"
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour If elseif else endif
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local i
|
||||
LOCAL i
|
||||
|
||||
QOut( "Testing Harbour If elseif else endif" )
|
||||
for i := 1 to 5
|
||||
FOR i := 1 TO 5
|
||||
TestValue( i )
|
||||
next
|
||||
NEXT
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function TestValue( x )
|
||||
FUNCTION TestValue( x )
|
||||
|
||||
if x = 1
|
||||
IF x = 1
|
||||
QOut( "x is 1" )
|
||||
|
||||
elseif x = 2
|
||||
ELSEIF x = 2
|
||||
QOut( "x is 2" )
|
||||
|
||||
elseif x = 3
|
||||
ELSEIF x = 3
|
||||
QOut( "x is 3" )
|
||||
|
||||
elseif x = 4
|
||||
ELSEIF x = 4
|
||||
QOut( "x is 4" )
|
||||
|
||||
else
|
||||
ELSE
|
||||
QOut( "x is not 1 or 2 or 3 or 4" )
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
QOut( "Ok!" )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "set.ch"
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
* Placed in the public domain
|
||||
*/
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local oFrom
|
||||
local oTo
|
||||
local cOut
|
||||
LOCAL oFrom
|
||||
LOCAL oTo
|
||||
LOCAL cOut
|
||||
|
||||
set( _SET_EXACT, .T.)
|
||||
SET( _SET_EXACT, .T. )
|
||||
|
||||
oFrom := TOnTop() :New( "hello.prg", "R" )
|
||||
oTo := TTextFile():New( "hello.out", "W" )
|
||||
@@ -48,66 +48,69 @@ function Main()
|
||||
|
||||
QOut()
|
||||
QOut( "Basic copy loop using the default Run() from TTextFile" )
|
||||
do while !oFrom:lEoF
|
||||
DO WHILE !oFrom:lEoF
|
||||
cOut := oFrom:Run()
|
||||
QOut( cOut )
|
||||
oTo:Run( cOut )
|
||||
enddo
|
||||
ENDDO
|
||||
oFrom:Dispose()
|
||||
oTo:Dispose()
|
||||
|
||||
// Debug( __dbgvmStkGList() ) // Stack is OK!
|
||||
// Debug( __dbgvmStkGList() ) // Stack is OK!
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
//
|
||||
// Generic Empty Class
|
||||
//
|
||||
function TEmpty()
|
||||
|
||||
static oEmpty
|
||||
FUNCTION TEmpty()
|
||||
|
||||
if oEmpty == NIL
|
||||
STATIC oEmpty
|
||||
|
||||
IF oEmpty == NIL
|
||||
oEmpty := HBClass():New( "TEmpty" ) // Create a new class def
|
||||
|
||||
oEmpty:AddInline( "New", {|self|self} )
|
||||
oEmpty:AddInline( "New", { |self|self } )
|
||||
|
||||
oEmpty:AddInline( "Run", {||QOut( "Run !" )}) // Test command
|
||||
oEmpty:AddInline( "Set", {|self,xParam|::Out := xParam } )
|
||||
oEmpty:AddInline( "Run", { ||QOut( "Run !" ) } ) // Test command
|
||||
oEmpty:AddInline( "Set", { |self, xParam|::Out := xParam } )
|
||||
oEmpty:AddData( "Out", "Hi there" ) // Test command
|
||||
oEmpty:AddVirtual( "Dispose" ) // Clean up code
|
||||
|
||||
oEmpty:Create()
|
||||
endif
|
||||
return oEmpty:Instance()
|
||||
ENDIF
|
||||
|
||||
RETURN oEmpty:Instance()
|
||||
|
||||
//
|
||||
// Let's add another one on top
|
||||
//
|
||||
function TOnTop()
|
||||
|
||||
static oOnTop
|
||||
FUNCTION TOnTop()
|
||||
|
||||
if oOnTop == NIL
|
||||
STATIC oOnTop
|
||||
|
||||
IF oOnTop == NIL
|
||||
oOnTop := HBClass():New( "TOnTop", "TTextFile" )
|
||||
oOnTop:AddInline( "Say", {|self, cArg| QOut( __objSendMsg(self, cArg) ) } )
|
||||
oOnTop:AddInline( "Say", { |self, cArg| QOut( __objSendMsg(self, cArg ) ) } )
|
||||
oOnTop:Create()
|
||||
endif
|
||||
return oOnTop:Instance()
|
||||
ENDIF
|
||||
|
||||
RETURN oOnTop:Instance()
|
||||
|
||||
//
|
||||
// Generic Text file handler
|
||||
//
|
||||
function TTextFile()
|
||||
|
||||
static oFile
|
||||
FUNCTION TTextFile()
|
||||
|
||||
if oFile == NIL
|
||||
STATIC oFile
|
||||
|
||||
IF oFile == NIL
|
||||
oFile := HBClass():New( "TTextFile", "TEmpty" )
|
||||
// Create a new class def
|
||||
// from TEmpty class
|
||||
// Create a new class def
|
||||
// from TEmpty class
|
||||
|
||||
oFile:AddData( "cFileName" ) // Filename spec. by user
|
||||
oFile:AddData( "hFile" ) // File handle
|
||||
@@ -117,7 +120,7 @@ function TTextFile()
|
||||
oFile:AddData( "cBlock" ) // Storage block
|
||||
oFile:AddData( "nBlockSize" ) // Size of read-ahead buffer
|
||||
oFile:AddData( "cMode" ) // Mode of file use
|
||||
// R = read, W = write
|
||||
// R = read, W = write
|
||||
|
||||
oFile:AddMethod( "New" , @New() ) // Constructor
|
||||
oFile:AddMethod( "Run" , @Run() ) // Get/set data
|
||||
@@ -128,9 +131,9 @@ function TTextFile()
|
||||
oFile:AddMethod( "Goto" , @Goto() ) // Go to line
|
||||
|
||||
oFile:Create()
|
||||
endif
|
||||
return oFile:Instance()
|
||||
ENDIF
|
||||
|
||||
RETURN oFile:Instance()
|
||||
|
||||
//
|
||||
// Method TextFile:New -> Create a new text file
|
||||
@@ -139,9 +142,10 @@ return oFile:Instance()
|
||||
// <cMode> mode for opening. Default "R"
|
||||
// <nBlockSize> Optional maximum blocksize
|
||||
//
|
||||
function New( cFileName, cMode, nBlock )
|
||||
|
||||
local self := QSelf() // Get self
|
||||
FUNCTION New( cFileName, cMode, nBlock )
|
||||
|
||||
LOCAL self := QSelf() // Get self
|
||||
|
||||
::nLine := 0
|
||||
::lEoF := .F.
|
||||
@@ -150,108 +154,109 @@ function New( cFileName, cMode, nBlock )
|
||||
::cMode := Default( cMode, "R" )
|
||||
|
||||
if ::cMode == "R"
|
||||
::hFile := fOpen( cFileName )
|
||||
::hFile := FOpen( cFileName )
|
||||
elseif ::cMode == "W"
|
||||
::hFile := fCreate( cFileName )
|
||||
else
|
||||
::hFile := FCreate( cFileName )
|
||||
ELSE
|
||||
QOut( "DosFile Init: Unknown file mode:", ::cMode )
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
::nError := fError()
|
||||
::nError := FError()
|
||||
if ::nError != 0
|
||||
::lEoF := .T.
|
||||
QOut( "Error ", ::nError)
|
||||
endif
|
||||
QOut( "Error ", ::nError )
|
||||
ENDIF
|
||||
::nBlockSize := Default( nBlock, 4096 )
|
||||
|
||||
return self
|
||||
RETURN self
|
||||
|
||||
FUNCTION RUN( xTxt, lCRLF )
|
||||
|
||||
function Run( xTxt, lCRLF )
|
||||
|
||||
local self := QSelf()
|
||||
local xRet
|
||||
LOCAL self := QSelf()
|
||||
LOCAL xRet
|
||||
|
||||
if ::cMode == "R"
|
||||
xRet := ::Read()
|
||||
else
|
||||
ELSE
|
||||
xRet := ::WriteLn( xTxt, lCRLF )
|
||||
endif
|
||||
return xRet
|
||||
ENDIF
|
||||
|
||||
RETURN xRet
|
||||
|
||||
//
|
||||
// Dispose -> Close the file handle
|
||||
//
|
||||
function Dispose()
|
||||
|
||||
local self := QSelf()
|
||||
FUNCTION Dispose()
|
||||
|
||||
LOCAL self := QSelf()
|
||||
|
||||
::cBlock := NIL
|
||||
if ::hFile != -1
|
||||
if ::cMode == "W" .and. ::nError != 0
|
||||
::Write( Chr(26) ) // Do not forget EOF marker
|
||||
endif
|
||||
if !fClose(::hFile)
|
||||
::nError := fError()
|
||||
QOut( "Dos Error closing ", ::cFileName, " Code ", ::nError)
|
||||
endif
|
||||
endif
|
||||
return self
|
||||
if ::hFile != - 1
|
||||
if ::cMode == "W" .AND. ::nError != 0
|
||||
::Write( Chr( 26 ) ) // Do not forget EOF marker
|
||||
ENDIF
|
||||
IF !FClose( ::hFile )
|
||||
::nError := FError()
|
||||
QOut( "Dos Error closing ", ::cFileName, " Code ", ::nError )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN self
|
||||
|
||||
//
|
||||
// Read a single line
|
||||
//
|
||||
function Read()
|
||||
|
||||
local self := QSelf()
|
||||
local cRet := ""
|
||||
local cBlock
|
||||
local nCrPos
|
||||
local nEoFPos
|
||||
local nRead
|
||||
FUNCTION READ()
|
||||
|
||||
if ::hFile == -1
|
||||
LOCAL self := QSelf()
|
||||
LOCAL cRet := ""
|
||||
LOCAL cBlock
|
||||
LOCAL nCrPos
|
||||
LOCAL nEoFPos
|
||||
LOCAL nRead
|
||||
|
||||
if ::hFile == - 1
|
||||
QOut( "DosFile:Read : No file open" )
|
||||
elseif ::cMode != "R"
|
||||
QOut( "File ", ::cFileName, " not open for reading" )
|
||||
elseif !::lEoF
|
||||
ELSEIF !::lEoF
|
||||
|
||||
if Len(::cBlock) == 0 // Read new block
|
||||
cBlock := fReadStr( ::hFile, ::nBlockSize )
|
||||
if len(cBlock) == 0
|
||||
::nError := fError() // Error or EOF
|
||||
IF Len( ::cBlock ) == 0 // Read new block
|
||||
cBlock := FReadStr( ::hFile, ::nBlockSize )
|
||||
IF Len( cBlock ) == 0
|
||||
::nError := FError() // Error or EOF
|
||||
::lEoF := .T.
|
||||
else
|
||||
ELSE
|
||||
::cBlock := cBlock
|
||||
endif
|
||||
endif
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
if !::lEoF
|
||||
::nLine++
|
||||
nCRPos := At(Chr(10), ::cBlock)
|
||||
if nCRPos != 0 // More than one line read
|
||||
cRet := Substr( ::cBlock, 1, nCRPos - 1)
|
||||
::cBlock := Substr( ::cBlock, nCRPos + 1)
|
||||
else // No complete line
|
||||
IF !::lEoF
|
||||
::nLine ++
|
||||
nCRPos := At( Chr( 10 ), ::cBlock )
|
||||
IF nCRPos != 0 // More than one line read
|
||||
cRet := SubStr( ::cBlock, 1, nCRPos - 1 )
|
||||
::cBlock := SubStr( ::cBlock, nCRPos + 1 )
|
||||
ELSE // No complete line
|
||||
cRet := ::cBlock
|
||||
::cBlock := ""
|
||||
cRet += ::Read() // Read the rest
|
||||
if !::lEoF
|
||||
::nLine-- // Adjust erroneous line count
|
||||
endif
|
||||
endif
|
||||
nEoFPos := At( Chr(26), cRet )
|
||||
if nEoFPos != 0 // End of file read
|
||||
cRet := Substr( cRet, 1, nEoFPos-1 )
|
||||
IF !::lEoF
|
||||
::nLine -- // Adjust erroneous line count
|
||||
ENDIF
|
||||
ENDIF
|
||||
nEoFPos := At( Chr( 26 ), cRet )
|
||||
IF nEoFPos != 0 // End of file read
|
||||
cRet := SubStr( cRet, 1, nEoFPos - 1 )
|
||||
::lEoF := .T.
|
||||
endif
|
||||
cRet := Strtran( cRet, Chr(13), "" ) // Remove CR
|
||||
endif
|
||||
endif
|
||||
return cRet
|
||||
ENDIF
|
||||
cRet := StrTran( cRet, Chr( 13 ), "" ) // Remove CR
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN cRet
|
||||
|
||||
//
|
||||
// WriteLn -> Write a line to a file
|
||||
@@ -260,56 +265,58 @@ return cRet
|
||||
// one or more strings
|
||||
// <lCRLF> End with Carriage Return/Line Feed (Default == TRUE)
|
||||
//
|
||||
function WriteLn( xTxt, lCRLF )
|
||||
|
||||
local self := QSelf()
|
||||
local cBlock
|
||||
FUNCTION WriteLn( xTxt, lCRLF )
|
||||
|
||||
if ::hFile == -1
|
||||
LOCAL self := QSelf()
|
||||
LOCAL cBlock
|
||||
|
||||
if ::hFile == - 1
|
||||
QOut( "DosFile:Write : No file open" )
|
||||
elseif ::cMode != 'W'
|
||||
QOut( "File ", ::cFileName," not opened for writing" )
|
||||
else
|
||||
QOut( "File ", ::cFileName, " not opened for writing" )
|
||||
ELSE
|
||||
cBlock := ToChar( xTxt ) // Convert to string
|
||||
if Default( lCRLF, .T. )
|
||||
cBlock += Chr(10)+Chr(13)
|
||||
endif
|
||||
fWrite( ::hFile, cBlock, len(cBlock) )
|
||||
if fError() != 0
|
||||
::nError := fError() // Not completely written !
|
||||
endif
|
||||
IF DEFAULT( lCRLF, .T. )
|
||||
cBlock += Chr( 10 ) + Chr( 13 )
|
||||
ENDIF
|
||||
FWrite( ::hFile, cBlock, Len( cBlock ) )
|
||||
IF FError() != 0
|
||||
::nError := FError() // Not completely written !
|
||||
ENDIF
|
||||
::nLine := ::nLine + 1
|
||||
endif
|
||||
return self
|
||||
ENDIF
|
||||
|
||||
RETURN self
|
||||
|
||||
function Write( xTxt )
|
||||
FUNCTION Write( xTxt )
|
||||
|
||||
local self := QSelf()
|
||||
LOCAL self := QSelf()
|
||||
|
||||
return ::WriteLn( xTxt, .F. )
|
||||
return ::WriteLn( xTxt, .F. )
|
||||
|
||||
//
|
||||
// Go to a specified line number
|
||||
//
|
||||
|
||||
//
|
||||
// Go to a specified line number
|
||||
//
|
||||
static function Goto( nLine )
|
||||
STATIC FUNCTION GOTO( nLine )
|
||||
|
||||
local self := QSelf()
|
||||
local nWhere := 1
|
||||
LOCAL self := QSelf()
|
||||
LOCAL nWhere := 1
|
||||
|
||||
if Empty(::hFile)
|
||||
IF Empty( ::hFile )
|
||||
QOut( "DosFile:Goto : No file open" )
|
||||
elseif ::cMode != "R"
|
||||
QOut( "File ", ::cFileName, " not open for reading" )
|
||||
else
|
||||
ELSE
|
||||
::lEoF := .F. // Clear (old) End of file
|
||||
::nLine := 0 // Start at beginning
|
||||
::cBlock := ""
|
||||
fSeek(::hFile, 0) // Go top
|
||||
do while !::lEoF .and. nWhere < nLine
|
||||
nWhere++
|
||||
FSeek( ::hFile, 0 ) // Go top
|
||||
DO WHILE !::lEoF .AND. nWhere < nLine
|
||||
nWhere ++
|
||||
::Read()
|
||||
enddo
|
||||
endif
|
||||
return !::lEoF
|
||||
ENDDO
|
||||
ENDIF
|
||||
|
||||
RETURN !::lEoF
|
||||
|
||||
@@ -4,33 +4,30 @@
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local o := Three():New()
|
||||
LOCAL o := Three():New()
|
||||
|
||||
o:CheckIt()
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
CLASS One
|
||||
CREATE CLASS One
|
||||
|
||||
METHOD New() INLINE Self
|
||||
|
||||
METHOD Test() INLINE QOut( "One" )
|
||||
|
||||
METHOD CheckIt() INLINE ::Test()
|
||||
|
||||
ENDCLASS
|
||||
|
||||
CLASS Two FROM One
|
||||
CREATE CLASS Two FROM One
|
||||
|
||||
METHOD Test() INLINE Super:Test()
|
||||
|
||||
METHOD CheckIt() INLINE Super:CheckIt()
|
||||
|
||||
ENDCLASS
|
||||
|
||||
CLASS Three FROM Two
|
||||
CREATE CLASS Three FROM Two
|
||||
|
||||
METHOD Test() INLINE QOut( "Three" )
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define CRLF (Chr(13) + Chr(10))
|
||||
|
||||
FUNCTION Main( cFilename, cSection )
|
||||
PROCEDURE Main( cFilename, cSection )
|
||||
|
||||
LOCAL oIni := TIniFile():New( Default( cFilename, "harbour.ini" ) )
|
||||
LOCAL s, n := Val( Default( cSection, "1" ) )
|
||||
@@ -15,8 +13,8 @@ FUNCTION Main( cFilename, cSection )
|
||||
AEval( s, {| x | QOut( "[" + x + "]" ) } )
|
||||
|
||||
QOut( "" )
|
||||
QOut( "[" + s[n] + "]" )
|
||||
s := oIni:ReadSection( s[n] )
|
||||
QOut( "[" + s[ n ] + "]" )
|
||||
s := oIni:ReadSection( s[ n ] )
|
||||
AEval( s, {| x | QOut( x ) } )
|
||||
|
||||
oIni:WriteDate( "Date Test", "Today", Date() )
|
||||
@@ -25,7 +23,7 @@ FUNCTION Main( cFilename, cSection )
|
||||
|
||||
oIni:UpdateFile()
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
FUNCTION TIniFile()
|
||||
|
||||
@@ -105,7 +103,7 @@ STATIC FUNCTION New( cFileName )
|
||||
|
||||
AAdd( ::Contents, { cLine, { /* this will be CurrArray */
|
||||
} } )
|
||||
CurrArray := ::Contents[Len(::Contents)][2]
|
||||
CurrArray := ::Contents[Len(::Contents)][ 2 ]
|
||||
|
||||
ELSEIF Left( cLine, 1 ) == ";" // preserve comments
|
||||
AAdd( CurrArray, { NIL, cLine } )
|
||||
@@ -144,22 +142,22 @@ STATIC FUNCTION ReadString( cSection, cIdent, cDefault )
|
||||
|
||||
IF Empty( cSection )
|
||||
cFind := Lower( cIdent )
|
||||
j := AScan( ::Contents, {| x | ValType( x[1] ) == "C" .AND. Lower( x[1] ) == cFind .AND. ValType( x[2] ) == "C" } )
|
||||
j := AScan( ::Contents, {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind .AND. ValType( x[ 2 ] ) == "C" } )
|
||||
|
||||
IF j > 0
|
||||
cResult := ::Contents[j][2]
|
||||
cResult := ::Contents[j][ 2 ]
|
||||
ENDIF
|
||||
|
||||
ELSE
|
||||
cFind := Lower( cSection )
|
||||
i := AScan( ::Contents, {| x | ValType( x[1] ) == "C" .AND. Lower( x[1] ) == cFind } )
|
||||
i := AScan( ::Contents, {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind } )
|
||||
|
||||
IF i > 0
|
||||
cFind := Lower( cIdent )
|
||||
j := AScan( ::Contents[i][2], {| x | ValType( x[1] ) == "C" .AND. Lower( x[1] ) == cFind } )
|
||||
j := AScan( ::Contents[ i ][ 2 ], {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind } )
|
||||
|
||||
IF j > 0
|
||||
cResult := ::Contents[i][2][j][2]
|
||||
cResult := ::Contents[ i ][ 2 ][j][ 2 ]
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -176,28 +174,28 @@ STATIC PROCEDURE WriteString( cSection, cIdent, cString )
|
||||
|
||||
ELSEIF Empty( cSection )
|
||||
cFind := Lower( cIdent )
|
||||
j := AScan( ::Contents, {| x | ValType( x[1] ) == "C" .AND. Lower( x[1] ) == cFind .AND. ValType( x[2] ) == "C" } )
|
||||
j := AScan( ::Contents, {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind .AND. ValType( x[ 2 ] ) == "C" } )
|
||||
|
||||
IF j > 0
|
||||
::Contents[j][2] := cString
|
||||
::Contents[j][ 2 ] := cString
|
||||
|
||||
ELSE
|
||||
AAdd( ::Contents, NIL )
|
||||
AIns( ::Contents, 1 )
|
||||
::Contents[1] := { cIdent, cString }
|
||||
::Contents[ 1 ] := { cIdent, cString }
|
||||
ENDIF
|
||||
|
||||
ELSE
|
||||
cFind := Lower( cSection )
|
||||
IF ( i := AScan( ::Contents, {| x | ValType(x[1] ) == "C" .AND. Lower(x[1] ) == cFind .AND. ValType(x[2] ) == "A" } ) ) > 0
|
||||
IF ( i := AScan( ::Contents, {| x | ValType(x[ 1 ] ) == "C" .AND. Lower(x[ 1 ] ) == cFind .AND. ValType(x[ 2 ] ) == "A" } ) ) > 0
|
||||
cFind := Lower( cIdent )
|
||||
j := AScan( ::Contents[i][2], {| x | ValType( x[1] ) == "C" .AND. Lower( x[1] ) == cFind } )
|
||||
j := AScan( ::Contents[ i ][ 2 ], {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind } )
|
||||
|
||||
IF j > 0
|
||||
::Contents[i][2][j][2] := cString
|
||||
::Contents[ i ][ 2 ][j][ 2 ] := cString
|
||||
|
||||
ELSE
|
||||
AAdd( ::Contents[i][2], { cIdent, cString } )
|
||||
AAdd( ::Contents[ i ][ 2 ], { cIdent, cString } )
|
||||
ENDIF
|
||||
|
||||
ELSE
|
||||
@@ -256,14 +254,14 @@ STATIC PROCEDURE DeleteKey( cSection, cIdent )
|
||||
LOCAL i, j
|
||||
|
||||
cSection := Lower( cSection )
|
||||
i := AScan( ::Contents, {| x | ValType( x[1] ) == "C" .AND. Lower( x[1] ) == cSection } )
|
||||
i := AScan( ::Contents, {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cSection } )
|
||||
|
||||
IF i > 0
|
||||
cIdent := Lower( cIdent )
|
||||
j := AScan( ::Contents[i][2], {| x | ValType( x[1] ) == "C" .AND. Lower( x[1] ) == cIdent } )
|
||||
j := AScan( ::Contents[ i ][ 2 ], {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cIdent } )
|
||||
|
||||
ADel( ::Contents[i][2], j )
|
||||
ASize( ::Contents[i][2], Len( ::Contents[i][2] ) - 1 )
|
||||
ADel( ::Contents[ i ][ 2 ], j )
|
||||
ASize( ::Contents[ i ][ 2 ], Len( ::Contents[ i ][ 2 ] ) - 1 )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
@@ -274,14 +272,14 @@ STATIC PROCEDURE EraseSection( cSection )
|
||||
LOCAL i
|
||||
|
||||
IF Empty( cSection )
|
||||
DO WHILE ( i := AScan( ::Contents, {| x | ValType(x[1] ) == "C" .AND. ValType(x[2] ) == "C" } ) ) > 0
|
||||
DO WHILE ( i := AScan( ::Contents, {| x | ValType(x[ 1 ] ) == "C" .AND. ValType(x[ 2 ] ) == "C" } ) ) > 0
|
||||
ADel( ::Contents, i )
|
||||
ASize( ::Contents, Len( ::Contents ) - 1 )
|
||||
ENDDO
|
||||
|
||||
ELSE
|
||||
cSection := Lower( cSection )
|
||||
IF ( i := AScan( ::Contents, {| x | ValType(x[1] ) == "C" .AND. Lower(x[1] ) == cSection .AND. ValType(x[2] ) == "A" } ) ) > 0
|
||||
IF ( i := AScan( ::Contents, {| x | ValType(x[ 1 ] ) == "C" .AND. Lower(x[ 1 ] ) == cSection .AND. ValType(x[ 2 ] ) == "A" } ) ) > 0
|
||||
ADel( ::Contents, i )
|
||||
ASize( ::Contents, Len( ::Contents ) - 1 )
|
||||
ENDIF
|
||||
@@ -296,19 +294,19 @@ STATIC FUNCTION ReadSection( cSection )
|
||||
|
||||
IF Empty( cSection )
|
||||
FOR i := 1 TO Len( ::Contents )
|
||||
IF ValType( ::Contents[i][1] ) == "C" .AND. ValType( ::Contents[i][2] ) == "C"
|
||||
AAdd( aSection, ::Contents[i][1] )
|
||||
IF ValType( ::Contents[ i ][ 1 ] ) == "C" .AND. ValType( ::Contents[ i ][ 2 ] ) == "C"
|
||||
AAdd( aSection, ::Contents[ i ][ 1 ] )
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
ELSE
|
||||
cSection := Lower( cSection )
|
||||
IF ( i := AScan( ::Contents, {| x | ValType(x[1] ) == "C" .AND. x[1] == cSection .AND. ValType(x[2] ) == "A" } ) ) > 0
|
||||
IF ( i := AScan( ::Contents, {| x | ValType(x[ 1 ] ) == "C" .AND. x[ 1 ] == cSection .AND. ValType(x[ 2 ] ) == "A" } ) ) > 0
|
||||
|
||||
FOR j := 1 TO Len( ::Contents[i][2] )
|
||||
FOR j := 1 TO Len( ::Contents[ i ][ 2 ] )
|
||||
|
||||
IF ::Contents[i][2][j][1] != NIL
|
||||
AAdd( aSection, ::Contents[i][2][j][1] )
|
||||
IF ::Contents[ i ][ 2 ][j][ 1 ] != NIL
|
||||
AAdd( aSection, ::Contents[ i ][ 2 ][j][ 1 ] )
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
@@ -323,8 +321,8 @@ STATIC FUNCTION ReadSections()
|
||||
|
||||
FOR i := 1 TO Len( ::Contents )
|
||||
|
||||
IF ValType( ::Contents[i][2] ) == "A"
|
||||
AAdd( aSections, ::Contents[i][1] )
|
||||
IF ValType( ::Contents[ i ][ 2 ] ) == "A"
|
||||
AAdd( aSections, ::Contents[ i ][ 1 ] )
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
@@ -338,23 +336,23 @@ STATIC PROCEDURE UpdateFile()
|
||||
hFile := FCreate( ::Filename )
|
||||
|
||||
FOR i := 1 TO Len( ::Contents )
|
||||
IF ::Contents[i][1] == NIL
|
||||
FWrite( hFile, ::Contents[i][2] + Chr( 13 ) + Chr( 10 ) )
|
||||
IF ::Contents[ i ][ 1 ] == NIL
|
||||
FWrite( hFile, ::Contents[ i ][ 2 ] + Chr( 13 ) + Chr( 10 ) )
|
||||
|
||||
ELSEIF ValType( ::Contents[i][2] ) == "A"
|
||||
FWrite( hFile, "[" + ::Contents[i][1] + "]" + Chr( 13 ) + Chr( 10 ) )
|
||||
FOR j := 1 TO Len( ::Contents[i][2] )
|
||||
ELSEIF ValType( ::Contents[ i ][ 2 ] ) == "A"
|
||||
FWrite( hFile, "[" + ::Contents[ i ][ 1 ] + "]" + Chr( 13 ) + Chr( 10 ) )
|
||||
FOR j := 1 TO Len( ::Contents[ i ][ 2 ] )
|
||||
|
||||
if ::Contents[i][2][j][1] == NIL
|
||||
FWrite( hFile, ::Contents[i][2][j][2] + Chr( 13 ) + Chr( 10 ) )
|
||||
if ::Contents[ i ][ 2 ][j][ 1 ] == NIL
|
||||
FWrite( hFile, ::Contents[ i ][ 2 ][j][ 2 ] + Chr( 13 ) + Chr( 10 ) )
|
||||
ELSE
|
||||
FWrite( hFile, ::Contents[i][2][j][1] + "=" + ::Contents[i][2][j][2] + Chr( 13 ) + Chr( 10 ) )
|
||||
FWrite( hFile, ::Contents[ i ][ 2 ][j][ 1 ] + "=" + ::Contents[ i ][ 2 ][j][ 2 ] + Chr( 13 ) + Chr( 10 ) )
|
||||
ENDIF
|
||||
next
|
||||
FWrite( hFile, Chr( 13 ) + Chr( 10 ) )
|
||||
|
||||
ELSEIF ValType( ::Contents[i][2] ) == "C"
|
||||
FWrite( hFile, ::Contents[i][1] + "=" + ::Contents[i][2] + Chr( 13 ) + Chr( 10 ) )
|
||||
ELSEIF ValType( ::Contents[ i ][ 2 ] ) == "C"
|
||||
FWrite( hFile, ::Contents[ i ][ 1 ] + "=" + ::Contents[ i ][ 2 ] + Chr( 13 ) + Chr( 10 ) )
|
||||
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
@@ -1,61 +1,63 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour INIT and EXIT functions and initialization
|
||||
// Testing Harbour INIT and EXIT functions and initialization
|
||||
// of static variables
|
||||
|
||||
STATIC static_var_accessed_in_INIT_function:=10000.15
|
||||
STATIC static_var_accessed_in_INIT_function := 10000.15
|
||||
MEMVAR _initStatics
|
||||
|
||||
function Main()
|
||||
STATIC static_var:="MAIN()"
|
||||
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 )
|
||||
static_var_accessed_in_INIT_function ++
|
||||
QOut( "global static=", static_var_accessed_in_INIT_function )
|
||||
|
||||
// Use PUBLIC variable created in INIT procedure
|
||||
Qout( "PUBLIC variable created in INIT procedure=", _initStatics )
|
||||
// Use PUBLIC variable created in INIT PROCEDURE
|
||||
QOut( "PUBLIC variable created in INIT PROCEDURE=", _initStatics )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
init function SecondOne()
|
||||
STATIC static_var:="SECOND()"
|
||||
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 )
|
||||
static_var_accessed_in_INIT_function ++
|
||||
QOut( "global static=", static_var_accessed_in_INIT_function )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
init function Third()
|
||||
STATIC static_var:="THIRD()"
|
||||
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 )
|
||||
static_var_accessed_in_INIT_function ++
|
||||
QOut( "global static=", static_var_accessed_in_INIT_function )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
exit function Fifth()
|
||||
STATIC static_var:="FIFTH()"
|
||||
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 )
|
||||
static_var_accessed_in_INIT_function --
|
||||
QOut( "global static=", static_var_accessed_in_INIT_function )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
exit function Sixth()
|
||||
STATIC static_var:="SIXTH()"
|
||||
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 )
|
||||
static_var_accessed_in_INIT_function --
|
||||
QOut( "global static=", static_var_accessed_in_INIT_function )
|
||||
|
||||
return nil
|
||||
RETURN nil
|
||||
|
||||
INIT PROCEDURE _INITSTATICS()
|
||||
PUBLIC _initStatics:="_INITSTATICS"
|
||||
RETURN
|
||||
PUBLIC _initStatics := "_INITSTATICS"
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
//
|
||||
// Test of inline function
|
||||
//
|
||||
function Main()
|
||||
|
||||
local oForm := TForm():New()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL oForm := TForm():New()
|
||||
|
||||
QOut( oForm:ClassName() )
|
||||
oForm:cText := "Let's show a form here :-)"
|
||||
|
||||
oForm:Show()
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function TForm()
|
||||
FUNCTION TForm()
|
||||
|
||||
static oClass
|
||||
STATIC oClass
|
||||
|
||||
if oClass == nil
|
||||
IF oClass == nil
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cText" ) // define this class objects datas
|
||||
@@ -30,20 +31,20 @@ function TForm()
|
||||
oClass:AddData( "nRight" )
|
||||
|
||||
oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
oClass:AddInline( "Show", {|self| QOut( self:cText ) } )
|
||||
oClass:AddInline( "Show", {| self | QOut( self:cText ) } )
|
||||
|
||||
oClass:Create() // builds this class
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
return oClass:Instance() // builds an object of this class
|
||||
RETURN oClass:Instance() // builds an object of this class
|
||||
|
||||
static function New()
|
||||
STATIC FUNCTION New()
|
||||
|
||||
local Self := QSelf()
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
::nTop := 10
|
||||
::nLeft := 10
|
||||
::nBottom := 20
|
||||
::nRight := 40
|
||||
|
||||
return Self
|
||||
RETURN Self
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour file io features
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local h := 0
|
||||
local cstr := " "
|
||||
local ntmp := 1
|
||||
LOCAL h := 0
|
||||
LOCAL cstr := " "
|
||||
LOCAL ntmp := 1
|
||||
|
||||
h := FCreate( "test.txt")
|
||||
qout('create handle',h)
|
||||
h := FCreate( "test.txt" )
|
||||
QOut( "create handle", h )
|
||||
|
||||
FWrite( h, "This test worked if you can see this" )
|
||||
|
||||
FClose( h )
|
||||
|
||||
h := FOpen("test.txt")
|
||||
qout('open handle',h)
|
||||
qout()
|
||||
h := FOpen( "test.txt" )
|
||||
QOut( "open handle", h )
|
||||
QOut()
|
||||
/* try to read what is there */
|
||||
do while ntmp # 0
|
||||
ntmp := FRead( h, @cstr, 1)
|
||||
if ntmp > 0
|
||||
qqout(cstr)
|
||||
endif
|
||||
enddo
|
||||
qout()
|
||||
DO WHILE ntmp != 0
|
||||
ntmp := FRead( h, @cstr, 1 )
|
||||
IF ntmp > 0
|
||||
QQOut( cstr )
|
||||
ENDIF
|
||||
ENDDO
|
||||
QOut()
|
||||
|
||||
FClose( h )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour file io features
|
||||
// using freadstr instead of fread
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local h := 0
|
||||
local cstr := " "
|
||||
local ntmp := 0
|
||||
LOCAL h := 0
|
||||
LOCAL cstr := " "
|
||||
LOCAL ntmp := 0
|
||||
|
||||
h := FCreate( "test.txt")
|
||||
qout('create handle',h)
|
||||
h := FCreate( "test.txt" )
|
||||
QOut( "create handle", h )
|
||||
|
||||
FWrite( h, "This test worked if you can see this" )
|
||||
|
||||
FClose( h )
|
||||
|
||||
h := FOpen("test.txt")
|
||||
qout('open handle',h)
|
||||
qout()
|
||||
h := FOpen( "test.txt" )
|
||||
QOut( "open handle", h )
|
||||
QOut()
|
||||
/* try to read what is there */
|
||||
do while asc(cstr) # 0
|
||||
cstr := FReadstr( h, 1)
|
||||
qqout(cstr)
|
||||
enddo
|
||||
DO WHILE Asc( cstr ) != 0
|
||||
cstr := FReadStr( h, 1 )
|
||||
QQOut( cstr )
|
||||
ENDDO
|
||||
|
||||
FClose( h )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//NOTEST
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
//DO NOT RUN THIS PROGRAM - ITS PURPOSE IS THE SYNTAX CHECK ONLY!
|
||||
|
||||
/* NOTE:
|
||||
* Harbour compiled with the Flex version of lexical scanner is
|
||||
/* NOTE:
|
||||
* Harbour compiled with the Flex version of lexical scanner is
|
||||
* designed to stay Clipper compatible in keywords usage.
|
||||
* Simplex version is extending their usage in some places.
|
||||
* Use HB_CLIPPER_COMPATIBLE to check compilation in full compatibility mode
|
||||
@@ -19,7 +19,7 @@ EXTERNAL __case, __begin
|
||||
STATIC nExt, bEgin, bReak, cAse, do, wHile, wIth, eXit, eXternal, fIeld
|
||||
STATIC for, in, include, init, loop, local, using, static, return, recover
|
||||
|
||||
Function Main()
|
||||
FUNCTION Main()
|
||||
|
||||
//just to prevent any disaster if someone will want to run it
|
||||
IF .T.
|
||||
@@ -118,7 +118,7 @@ Local nExt, nExt7, nExtNEXT
|
||||
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
next->next :=next->next + next->next //NEXT does not match FOR in Clipper and Harbour(Flex)
|
||||
#endif
|
||||
#endif
|
||||
next :=next->next
|
||||
( next )->( next() )
|
||||
|
||||
@@ -249,10 +249,10 @@ case )
|
||||
CASE 2+case
|
||||
case =case +1
|
||||
CASE case++
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
case-- //sorry -Clipper & Harbour(flex) doesn't compile this line - but SimpLex does
|
||||
case++ //sorry -Clipper & harbour(flex) doesn't compile this line - but SimpLex does
|
||||
#endif
|
||||
#endif
|
||||
( case++ )
|
||||
( case-- )
|
||||
CASE ++case
|
||||
@@ -341,10 +341,10 @@ LOCAL with
|
||||
ENDDO
|
||||
|
||||
while while
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
while++ //Clipper & harbour(flex) incomplete statement or unbalanced delimiter
|
||||
while-- //Clipper & harbour(flex) incomplete statement or unbalanced delimiter
|
||||
#endif
|
||||
#endif
|
||||
( while++ )
|
||||
( while-- )
|
||||
--while
|
||||
@@ -439,7 +439,7 @@ LOCAL end, while
|
||||
( end-- )
|
||||
end :=end++
|
||||
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
end->end +=1 //in Clipper & Harbour(flex): ENDIF does not match IF
|
||||
#endif
|
||||
end :=end->end
|
||||
@@ -447,7 +447,7 @@ LOCAL end, while
|
||||
DO end WITH end
|
||||
DO end WITH end++
|
||||
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
end->( end() ) //in Clipper & harbour(flex): ENDIF does not match IF
|
||||
#endif
|
||||
( end )->( end() )
|
||||
@@ -602,7 +602,7 @@ FUNCTION FOR( for )
|
||||
for[ for ] :=for
|
||||
for[ for ][ for ] :=for [ for ]
|
||||
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
for( for( for ) ) //in Clipper: incomplete statement or unbalanced delimiters
|
||||
for( 0 ) //in Clipper: incomplete statement or unbalanced delimiters
|
||||
for() //syntax error ')'
|
||||
@@ -901,7 +901,7 @@ PRIVATE &return
|
||||
return -1
|
||||
return+2
|
||||
return +2
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
#ifndef HB_CLIPPER_COMPATIBLE
|
||||
return++ //Clipper fails on this
|
||||
return-- //Clipper fails on this
|
||||
#endif
|
||||
|
||||
@@ -9,180 +9,194 @@
|
||||
|
||||
#include "hblang.ch"
|
||||
|
||||
function main( cLng )
|
||||
local i, a, aDay, aMnt, aErr, aInt, cDtFrm, cTrue, cFalse
|
||||
PROCEDURE Main( cLng )
|
||||
|
||||
HB_LANGSELECT("EN")
|
||||
aDay:=GET_DAYS()
|
||||
aMnt:=GET_MONTHS()
|
||||
aErr:=GET_ERR()
|
||||
aInt:=GET_IERR()
|
||||
cDtFrm:=HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT )
|
||||
cTrue :=HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT + 1 )
|
||||
cFalse:=HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT + 2 )
|
||||
LOCAL i, a, aDay, aMnt, aErr, aInt, cDtFrm, cTrue, cFalse
|
||||
|
||||
if !empty( cLng )
|
||||
HB_LANGSELECT( UPPER( cLng ) )
|
||||
endif
|
||||
hb_langSelect( "EN" )
|
||||
aDay := GET_DAYS()
|
||||
aMnt := GET_MONTHS()
|
||||
aErr := GET_ERR()
|
||||
aInt := GET_IERR()
|
||||
cDtFrm := hb_langMessage( HB_LANG_ITEM_BASE_TEXT )
|
||||
cTrue := hb_langMessage( HB_LANG_ITEM_BASE_TEXT + 1 )
|
||||
cFalse := hb_langMessage( HB_LANG_ITEM_BASE_TEXT + 2 )
|
||||
|
||||
? HB_LANGNAME()
|
||||
? "HB_LANG_ITEM_BASE_ID ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_ID )+"]"
|
||||
? "HB_LANG_ITEM_BASE_MONTH ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_MONTH )+"]"
|
||||
? "HB_LANG_ITEM_BASE_DAY ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_DAY )+"]"
|
||||
? "HB_LANG_ITEM_BASE_NATMSG ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_NATMSG )+"]"
|
||||
? "HB_LANG_ITEM_BASE_ERRDESC", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_ERRDESC)+"]"
|
||||
? "HB_LANG_ITEM_BASE_ERRINTR", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_ERRINTR)+"]"
|
||||
? "HB_LANG_ITEM_BASE_TEXT ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT )+"]"
|
||||
? "HB_LANGERRMSG(0)", HB_LANGERRMSG(0)
|
||||
?
|
||||
? "date format: " + HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT ) + " (" + cDtFrm + ")"
|
||||
? " TRUE val: " + HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT + 1 ) + " (" + cTrue + ")"
|
||||
? " FALSE val: " + HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT + 2 ) + " (" + cFalse + ")"
|
||||
?
|
||||
inkey(0)
|
||||
IF ! Empty( cLng )
|
||||
hb_langSelect( Upper( cLng ) )
|
||||
ENDIF
|
||||
|
||||
? "Errors:"
|
||||
? "-------"
|
||||
a:=GET_ERR()
|
||||
for i:=1 to len(a)
|
||||
? padr(a[i,1],15) + "|" + padr(aErr[i,2],30) + "|" + padr(a[i,2],32)
|
||||
next
|
||||
?
|
||||
inkey(0)
|
||||
? hb_langName()
|
||||
? "HB_LANG_ITEM_BASE_ID ", "[" + hb_langMessage( HB_LANG_ITEM_BASE_ID ) + "]"
|
||||
? "HB_LANG_ITEM_BASE_MONTH ", "[" + hb_langMessage( HB_LANG_ITEM_BASE_MONTH ) + "]"
|
||||
? "HB_LANG_ITEM_BASE_DAY ", "[" + hb_langMessage( HB_LANG_ITEM_BASE_DAY ) + "]"
|
||||
? "HB_LANG_ITEM_BASE_NATMSG ", "[" + hb_langMessage( HB_LANG_ITEM_BASE_NATMSG ) + "]"
|
||||
? "HB_LANG_ITEM_BASE_ERRDESC", "[" + hb_langMessage( HB_LANG_ITEM_BASE_ERRDESC ) + "]"
|
||||
? "HB_LANG_ITEM_BASE_ERRINTR", "[" + hb_langMessage( HB_LANG_ITEM_BASE_ERRINTR ) + "]"
|
||||
? "HB_LANG_ITEM_BASE_TEXT ", "[" + hb_langMessage( HB_LANG_ITEM_BASE_TEXT ) + "]"
|
||||
? "HB_LANGERRMSG(0)", hb_langErrMsg( 0 )
|
||||
?
|
||||
? "date format: " + hb_langMessage( HB_LANG_ITEM_BASE_TEXT ) + " (" + cDtFrm + ")"
|
||||
? " TRUE val: " + hb_langMessage( HB_LANG_ITEM_BASE_TEXT + 1 ) + " (" + cTrue + ")"
|
||||
? " FALSE val: " + hb_langMessage( HB_LANG_ITEM_BASE_TEXT + 2 ) + " (" + cFalse + ")"
|
||||
?
|
||||
Inkey( 0 )
|
||||
|
||||
? "Internal errors:"
|
||||
? "----------------"
|
||||
a:=GET_IERR()
|
||||
for i:=1 to len(a)
|
||||
? padr(a[i,1],15) + "|" + padr(aInt[i,2],30) + "|" + padr(a[i,2],32)
|
||||
next
|
||||
?
|
||||
inkey(0)
|
||||
? "Errors:"
|
||||
? "-------"
|
||||
a := GET_ERR()
|
||||
FOR i := 1 TO Len( a )
|
||||
? PadR( a[i,1], 15 ) + "|" + PadR( aErr[i,2], 30 ) + "|" + PadR( a[i,2], 32 )
|
||||
NEXT
|
||||
?
|
||||
Inkey( 0 )
|
||||
|
||||
? "Days:"
|
||||
? "-----"
|
||||
a:=GET_DAYS()
|
||||
for i:=1 to len(a)
|
||||
? " " + padr(aDay[i],15) + a[i]
|
||||
next
|
||||
?
|
||||
inkey(0)
|
||||
? "Internal errors:"
|
||||
? "----------------"
|
||||
a := GET_IERR()
|
||||
FOR i := 1 TO Len( a )
|
||||
? PadR( a[i,1], 15 ) + "|" + PadR( aInt[i,2], 30 ) + "|" + PadR( a[i,2], 32 )
|
||||
NEXT
|
||||
?
|
||||
Inkey( 0 )
|
||||
|
||||
? "Months:"
|
||||
? "-------"
|
||||
a:=GET_MONTHS()
|
||||
for i:=1 to len(a)
|
||||
? " " + padr(aMnt[i],15) + a[i]
|
||||
next
|
||||
?
|
||||
inkey(0)
|
||||
? "Days:"
|
||||
? "-----"
|
||||
a := GET_DAYS()
|
||||
FOR i := 1 TO Len( a )
|
||||
? " " + PadR( aDay[ i ], 15 ) + a[ i ]
|
||||
NEXT
|
||||
?
|
||||
Inkey( 0 )
|
||||
|
||||
return nil
|
||||
? "Months:"
|
||||
? "-------"
|
||||
a := GET_MONTHS()
|
||||
FOR i := 1 TO Len( a )
|
||||
? " " + PadR( aMnt[ i ], 15 ) + a[ i ]
|
||||
NEXT
|
||||
?
|
||||
Inkey( 0 )
|
||||
|
||||
function GET_DAYS()
|
||||
LOCAL i, n, aDays[7], dt:=date()
|
||||
for i:=1 to 7
|
||||
n:=dow(dt)
|
||||
aDays[n]:=cdow(dt)
|
||||
++dt
|
||||
next
|
||||
return (aDays)
|
||||
RETURN
|
||||
|
||||
function GET_MONTHS()
|
||||
LOCAL i, n, aMonths[12], dt:=date()
|
||||
dt-=day(dt)-1
|
||||
for i:=1 to 12
|
||||
n:=month(dt)
|
||||
aMonths[n]:=cmonth(dt)
|
||||
dt+=31
|
||||
dt-=day(dt)-1
|
||||
next
|
||||
return (aMonths)
|
||||
FUNCTION GET_DAYS()
|
||||
|
||||
function GET_ERR()
|
||||
local aErr
|
||||
aErr := { { "EG_ARG ", HB_LANGERRMSG( 1 ) }, ;
|
||||
{ "EG_BOUND ", HB_LANGERRMSG( 2 ) }, ;
|
||||
{ "EG_STROVERFLOW ", HB_LANGERRMSG( 3 ) }, ;
|
||||
{ "EG_NUMOVERFLOW ", HB_LANGERRMSG( 4 ) }, ;
|
||||
{ "EG_ZERODIV ", HB_LANGERRMSG( 5 ) }, ;
|
||||
{ "EG_NUMERR ", HB_LANGERRMSG( 6 ) }, ;
|
||||
{ "EG_SYNTAX ", HB_LANGERRMSG( 7 ) }, ;
|
||||
{ "EG_COMPLEXITY ", HB_LANGERRMSG( 8 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 9 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 10 ) }, ;
|
||||
{ "EG_MEM ", HB_LANGERRMSG( 11 ) }, ;
|
||||
{ "EG_NOFUNC ", HB_LANGERRMSG( 12 ) }, ;
|
||||
{ "EG_NOMETHOD ", HB_LANGERRMSG( 13 ) }, ;
|
||||
{ "EG_NOVAR ", HB_LANGERRMSG( 14 ) }, ;
|
||||
{ "EG_NOALIAS ", HB_LANGERRMSG( 15 ) }, ;
|
||||
{ "EG_NOVARMETHOD ", HB_LANGERRMSG( 16 ) }, ;
|
||||
{ "EG_BADALIAS ", HB_LANGERRMSG( 17 ) }, ;
|
||||
{ "EG_DUPALIAS ", HB_LANGERRMSG( 18 ) }, ;
|
||||
{ "EG_NOOBJECT ", HB_LANGERRMSG( 19 ) }, ;
|
||||
{ "EG_CREATE ", HB_LANGERRMSG( 20 ) }, ;
|
||||
{ "EG_OPEN ", HB_LANGERRMSG( 21 ) }, ;
|
||||
{ "EG_CLOSE ", HB_LANGERRMSG( 22 ) }, ;
|
||||
{ "EG_READ ", HB_LANGERRMSG( 23 ) }, ;
|
||||
{ "EG_WRITE ", HB_LANGERRMSG( 24 ) }, ;
|
||||
{ "EG_PRINT ", HB_LANGERRMSG( 25 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 26 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 27 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 28 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 29 ) }, ;
|
||||
{ "EG_UNSUPPORTED ", HB_LANGERRMSG( 30 ) }, ;
|
||||
{ "EG_LIMIT ", HB_LANGERRMSG( 31 ) }, ;
|
||||
{ "EG_CORRUPTION ", HB_LANGERRMSG( 32 ) }, ;
|
||||
{ "EG_DATATYPE ", HB_LANGERRMSG( 33 ) }, ;
|
||||
{ "EG_DATAWIDTH ", HB_LANGERRMSG( 34 ) }, ;
|
||||
{ "EG_NOTABLE ", HB_LANGERRMSG( 35 ) }, ;
|
||||
{ "EG_NOORDER ", HB_LANGERRMSG( 36 ) }, ;
|
||||
{ "EG_SHARED ", HB_LANGERRMSG( 37 ) }, ;
|
||||
{ "EG_UNLOCKED ", HB_LANGERRMSG( 38 ) }, ;
|
||||
{ "EG_READONLY ", HB_LANGERRMSG( 39 ) }, ;
|
||||
{ "EG_APPENDLOCK ", HB_LANGERRMSG( 40 ) }, ;
|
||||
{ "EG_LOCK ", HB_LANGERRMSG( 41 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 42 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 43 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 44 ) }, ;
|
||||
{ " ", HB_LANGERRMSG( 45 ) }, ;
|
||||
{ "EG_ARRACCESS ", HB_LANGERRMSG( 46 ) }, ;
|
||||
{ "EG_ARRASSIGN ", HB_LANGERRMSG( 47 ) }, ;
|
||||
{ "EG_ARRDIMENSION", HB_LANGERRMSG( 48 ) }, ;
|
||||
{ "EG_NOTARRAY ", HB_LANGERRMSG( 49 ) }, ;
|
||||
{ "EG_CONDITION ", HB_LANGERRMSG( 50 ) } }
|
||||
return aErr
|
||||
LOCAL i, n, aDays[ 7 ], dt := Date()
|
||||
|
||||
function HB_LANGERRINTR(n)
|
||||
return HB_LANGMESSAGE(HB_LANG_ITEM_BASE_ERRINTR + n - 9000 )
|
||||
for i := 1 TO 7
|
||||
n := DOW( dt )
|
||||
aDays[ n ] := CDOW( dt )
|
||||
++dt
|
||||
next
|
||||
|
||||
function GET_IERR()
|
||||
local aErr
|
||||
aErr := { ;
|
||||
{ "HB_EI_ERRUNRECOV ", HB_LANGERRINTR(9000) }, ;
|
||||
{ "HB_EI_ERRRECFAILURE ", HB_LANGERRINTR(9001) }, ;
|
||||
{ "HB_EI_ERRNOBLOCK ", HB_LANGERRINTR(9002) }, ;
|
||||
{ "HB_EI_ERRTOOMANY ", HB_LANGERRINTR(9003) }, ;
|
||||
{ "HB_EI_RDDINVALID ", HB_LANGERRINTR(9004) }, ;
|
||||
{ "HB_EI_CLSINVMETHOD ", HB_LANGERRINTR(9005) }, ;
|
||||
{ "HB_EI_XGRABALLOC ", HB_LANGERRINTR(9006) }, ;
|
||||
{ "HB_EI_XREALLOCNULL ", HB_LANGERRINTR(9007) }, ;
|
||||
{ "HB_EI_XREALLOCINV ", HB_LANGERRINTR(9008) }, ;
|
||||
{ "HB_EI_XREALLOC ", HB_LANGERRINTR(9009) }, ;
|
||||
{ "HB_EI_XFREEINV ", HB_LANGERRINTR(9010) }, ;
|
||||
{ "HB_EI_XFREENULL ", HB_LANGERRINTR(9011) }, ;
|
||||
{ "HB_EI_VMBADSTARTUP ", HB_LANGERRINTR(9012) }, ;
|
||||
{ "HB_EI_VMNOSTARTUP ", HB_LANGERRINTR(9013) }, ;
|
||||
{ "HB_EI_VMBADOPCODE ", HB_LANGERRINTR(9014) }, ;
|
||||
{ "HB_EI_VMNOTSYMBOL ", HB_LANGERRINTR(9015) }, ;
|
||||
{ "HB_EI_VMINVSYMBOL ", HB_LANGERRINTR(9016) }, ;
|
||||
{ "HB_EI_VMNOTCBLOCK ", HB_LANGERRINTR(9017) }, ;
|
||||
{ "HB_EI_VMPOPINVITEM ", HB_LANGERRINTR(9018) }, ;
|
||||
{ "HB_EI_STACKUFLOW ", HB_LANGERRINTR(9019) }, ;
|
||||
{ "HB_EI_ITEMBADCOPY ", HB_LANGERRINTR(9020) }, ;
|
||||
{ "HB_EI_MVBADSYMBOL ", HB_LANGERRINTR(9021) }, ;
|
||||
{ "HB_EI_XMEMOVERFLOW ", HB_LANGERRINTR(9022) }, ;
|
||||
{ "HB_EI_XGRABNULLSIZE ", HB_LANGERRINTR(9023) }, ;
|
||||
{ "HB_EI_XREALLOCNULLSIZE", HB_LANGERRINTR(9024) }, ;
|
||||
{ "HB_EI_XALLOCNULLSIZE ", HB_LANGERRINTR(9025) } }
|
||||
return aErr
|
||||
RETURN ( aDays )
|
||||
|
||||
FUNCTION GET_MONTHS()
|
||||
|
||||
LOCAL i, n, aMonths[12], dt := Date()
|
||||
|
||||
dt -= Day( dt ) - 1
|
||||
for i := 1 TO 12
|
||||
n := Month( dt )
|
||||
aMonths[ n ] := CMonth( dt )
|
||||
dt += 31
|
||||
dt -= Day( dt ) - 1
|
||||
next
|
||||
|
||||
RETURN ( aMonths )
|
||||
|
||||
FUNCTION GET_ERR()
|
||||
|
||||
LOCAL aErr
|
||||
|
||||
aErr := { { "EG_ARG ", hb_langErrMsg( 1 ) }, ;
|
||||
{ "EG_BOUND ", hb_langErrMsg( 2 ) }, ;
|
||||
{ "EG_STROVERFLOW ", hb_langErrMsg( 3 ) }, ;
|
||||
{ "EG_NUMOVERFLOW ", hb_langErrMsg( 4 ) }, ;
|
||||
{ "EG_ZERODIV ", hb_langErrMsg( 5 ) }, ;
|
||||
{ "EG_NUMERR ", hb_langErrMsg( 6 ) }, ;
|
||||
{ "EG_SYNTAX ", hb_langErrMsg( 7 ) }, ;
|
||||
{ "EG_COMPLEXITY ", hb_langErrMsg( 8 ) }, ;
|
||||
{ " ", hb_langErrMsg( 9 ) }, ;
|
||||
{ " ", hb_langErrMsg( 10 ) }, ;
|
||||
{ "EG_MEM ", hb_langErrMsg( 11 ) }, ;
|
||||
{ "EG_NOFUNC ", hb_langErrMsg( 12 ) }, ;
|
||||
{ "EG_NOMETHOD ", hb_langErrMsg( 13 ) }, ;
|
||||
{ "EG_NOVAR ", hb_langErrMsg( 14 ) }, ;
|
||||
{ "EG_NOALIAS ", hb_langErrMsg( 15 ) }, ;
|
||||
{ "EG_NOVARMETHOD ", hb_langErrMsg( 16 ) }, ;
|
||||
{ "EG_BADALIAS ", hb_langErrMsg( 17 ) }, ;
|
||||
{ "EG_DUPALIAS ", hb_langErrMsg( 18 ) }, ;
|
||||
{ "EG_NOOBJECT ", hb_langErrMsg( 19 ) }, ;
|
||||
{ "EG_CREATE ", hb_langErrMsg( 20 ) }, ;
|
||||
{ "EG_OPEN ", hb_langErrMsg( 21 ) }, ;
|
||||
{ "EG_CLOSE ", hb_langErrMsg( 22 ) }, ;
|
||||
{ "EG_READ ", hb_langErrMsg( 23 ) }, ;
|
||||
{ "EG_WRITE ", hb_langErrMsg( 24 ) }, ;
|
||||
{ "EG_PRINT ", hb_langErrMsg( 25 ) }, ;
|
||||
{ " ", hb_langErrMsg( 26 ) }, ;
|
||||
{ " ", hb_langErrMsg( 27 ) }, ;
|
||||
{ " ", hb_langErrMsg( 28 ) }, ;
|
||||
{ " ", hb_langErrMsg( 29 ) }, ;
|
||||
{ "EG_UNSUPPORTED ", hb_langErrMsg( 30 ) }, ;
|
||||
{ "EG_LIMIT ", hb_langErrMsg( 31 ) }, ;
|
||||
{ "EG_CORRUPTION ", hb_langErrMsg( 32 ) }, ;
|
||||
{ "EG_DATATYPE ", hb_langErrMsg( 33 ) }, ;
|
||||
{ "EG_DATAWIDTH ", hb_langErrMsg( 34 ) }, ;
|
||||
{ "EG_NOTABLE ", hb_langErrMsg( 35 ) }, ;
|
||||
{ "EG_NOORDER ", hb_langErrMsg( 36 ) }, ;
|
||||
{ "EG_SHARED ", hb_langErrMsg( 37 ) }, ;
|
||||
{ "EG_UNLOCKED ", hb_langErrMsg( 38 ) }, ;
|
||||
{ "EG_READONLY ", hb_langErrMsg( 39 ) }, ;
|
||||
{ "EG_APPENDLOCK ", hb_langErrMsg( 40 ) }, ;
|
||||
{ "EG_LOCK ", hb_langErrMsg( 41 ) }, ;
|
||||
{ " ", hb_langErrMsg( 42 ) }, ;
|
||||
{ " ", hb_langErrMsg( 43 ) }, ;
|
||||
{ " ", hb_langErrMsg( 44 ) }, ;
|
||||
{ " ", hb_langErrMsg( 45 ) }, ;
|
||||
{ "EG_ARRACCESS ", hb_langErrMsg( 46 ) }, ;
|
||||
{ "EG_ARRASSIGN ", hb_langErrMsg( 47 ) }, ;
|
||||
{ "EG_ARRDIMENSION", hb_langErrMsg( 48 ) }, ;
|
||||
{ "EG_NOTARRAY ", hb_langErrMsg( 49 ) }, ;
|
||||
{ "EG_CONDITION ", hb_langErrMsg( 50 ) } }
|
||||
|
||||
RETURN aErr
|
||||
|
||||
FUNCTION HB_LANGERRINTR( n )
|
||||
|
||||
RETURN hb_langMessage( HB_LANG_ITEM_BASE_ERRINTR + n - 9000 )
|
||||
|
||||
FUNCTION GET_IERR()
|
||||
|
||||
LOCAL aErr
|
||||
|
||||
aErr := { ;
|
||||
{ "HB_EI_ERRUNRECOV ", HB_LANGERRINTR( 9000 ) }, ;
|
||||
{ "HB_EI_ERRRECFAILURE ", HB_LANGERRINTR( 9001 ) }, ;
|
||||
{ "HB_EI_ERRNOBLOCK ", HB_LANGERRINTR( 9002 ) }, ;
|
||||
{ "HB_EI_ERRTOOMANY ", HB_LANGERRINTR( 9003 ) }, ;
|
||||
{ "HB_EI_RDDINVALID ", HB_LANGERRINTR( 9004 ) }, ;
|
||||
{ "HB_EI_CLSINVMETHOD ", HB_LANGERRINTR( 9005 ) }, ;
|
||||
{ "HB_EI_XGRABALLOC ", HB_LANGERRINTR( 9006 ) }, ;
|
||||
{ "HB_EI_XREALLOCNULL ", HB_LANGERRINTR( 9007 ) }, ;
|
||||
{ "HB_EI_XREALLOCINV ", HB_LANGERRINTR( 9008 ) }, ;
|
||||
{ "HB_EI_XREALLOC ", HB_LANGERRINTR( 9009 ) }, ;
|
||||
{ "HB_EI_XFREEINV ", HB_LANGERRINTR( 9010 ) }, ;
|
||||
{ "HB_EI_XFREENULL ", HB_LANGERRINTR( 9011 ) }, ;
|
||||
{ "HB_EI_VMBADSTARTUP ", HB_LANGERRINTR( 9012 ) }, ;
|
||||
{ "HB_EI_VMNOSTARTUP ", HB_LANGERRINTR( 9013 ) }, ;
|
||||
{ "HB_EI_VMBADOPCODE ", HB_LANGERRINTR( 9014 ) }, ;
|
||||
{ "HB_EI_VMNOTSYMBOL ", HB_LANGERRINTR( 9015 ) }, ;
|
||||
{ "HB_EI_VMINVSYMBOL ", HB_LANGERRINTR( 9016 ) }, ;
|
||||
{ "HB_EI_VMNOTCBLOCK ", HB_LANGERRINTR( 9017 ) }, ;
|
||||
{ "HB_EI_VMPOPINVITEM ", HB_LANGERRINTR( 9018 ) }, ;
|
||||
{ "HB_EI_STACKUFLOW ", HB_LANGERRINTR( 9019 ) }, ;
|
||||
{ "HB_EI_ITEMBADCOPY ", HB_LANGERRINTR( 9020 ) }, ;
|
||||
{ "HB_EI_MVBADSYMBOL ", HB_LANGERRINTR( 9021 ) }, ;
|
||||
{ "HB_EI_XMEMOVERFLOW ", HB_LANGERRINTR( 9022 ) }, ;
|
||||
{ "HB_EI_XGRABNULLSIZE ", HB_LANGERRINTR( 9023 ) }, ;
|
||||
{ "HB_EI_XREALLOCNULLSIZE", HB_LANGERRINTR( 9024 ) }, ;
|
||||
{ "HB_EI_XALLOCNULLSIZE ", HB_LANGERRINTR( 9025 ) } }
|
||||
|
||||
RETURN aErr
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//NOTEST
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
FUNCTION MAIN()
|
||||
PROCEDURE Main()
|
||||
LOCAL a, b
|
||||
|
||||
TEST1() ; TEST2()
|
||||
@@ -68,7 +68,7 @@ b ;
|
||||
1;
|
||||
,;
|
||||
2;
|
||||
];
|
||||
];
|
||||
[ ;
|
||||
3 ]
|
||||
|
||||
@@ -82,11 +82,11 @@ b ;
|
||||
;
|
||||
55
|
||||
|
||||
RETURN nil
|
||||
RETURN
|
||||
|
||||
FUNCTION TEST1() ; LOCAL n; IF n==5; n =4; END; RETURN n
|
||||
|
||||
FUNCTION TEST2(); LOCAL n
|
||||
|
||||
WHILE n<5; n++; END
|
||||
RETURN n
|
||||
WHILE n<5; n++; END
|
||||
RETURN n
|
||||
|
||||
@@ -1,101 +1,100 @@
|
||||
//NOTEST
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// ; Pushing Harbour preprocessor to the line length limit.
|
||||
// ; Donated to the public domain by
|
||||
// Viktor Szakats (harbour syenar.net)
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LongLine1()
|
||||
LongLine1()
|
||||
|
||||
RETURN 0
|
||||
RETURN
|
||||
|
||||
FUNCTION LongLine1()
|
||||
RETURN {;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9}}
|
||||
|
||||
RETURN {;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9},;
|
||||
{I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") , {|| I_("XXXXXXXXXXXXXXXXXXXXXXXXXXX") }, 99, 9}}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour long string handling with device output.
|
||||
/* Harbour Project source code
|
||||
@@ -8,7 +8,7 @@
|
||||
Donated to the public domain on 2001-03-08 by David G. Holm <dholm@jsd-llc.com>
|
||||
*/
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL cShort := "1234567890"
|
||||
LOCAL i, j, cLong, cBuffer, nHandle
|
||||
@@ -22,21 +22,21 @@ FUNCTION Main()
|
||||
// Write the long string to file long_str.prn
|
||||
SET PRINTER TO long_str
|
||||
SET DEVICE TO PRINTER
|
||||
DEVOUT( cLong )
|
||||
DevOut( cLong )
|
||||
SET PRINTER OFF
|
||||
SET DEVICE TO SCREEN
|
||||
|
||||
// Confirm the string length and that a copy is exactly identical.
|
||||
? "The length of the long string is", iif( LEN( cLong ) == 80 * 1024, "correct", "wrong" )
|
||||
? "The length of the long string is", iif( Len( cLong ) == 80 * 1024, "correct", "wrong" )
|
||||
cBuffer := cLong
|
||||
? "The length of a copy of the long string is", iif( LEN( cLong ) == 80 * 1024, "correct", "wrong" )
|
||||
? "The length of a copy of the long string is", iif( Len( cLong ) == 80 * 1024, "correct", "wrong" )
|
||||
? "The copy of the long string is", iif( cLong == cBuffer, "equal", "not equal" ), "to the long string"
|
||||
|
||||
// Read the string back in and compare it to the original.
|
||||
nHandle := FOPEN( "long_str.prn" )
|
||||
cBuffer := FREADSTR( nHandle, 90000 )
|
||||
? "Original:", LEN( cLong )
|
||||
? "From file:", LEN( cBuffer )
|
||||
nHandle := FOpen( "long_str.prn" )
|
||||
cBuffer := FReadStr( nHandle, 90000 )
|
||||
? "Original:", Len( cLong )
|
||||
? "From file:", Len( cBuffer )
|
||||
? "The strings are", iif( cLong == cBuffer, "equal", "not equal" )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Written by Eddie Runia <eddie@runia.com>
|
||||
// www - http://harbour-project.org
|
||||
//
|
||||
// Placed in the public domain
|
||||
//
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
function 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)+"\"
|
||||
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 )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,40 +1,39 @@
|
||||
//NOTEST - You'll want to test this with the output redirected to a file!
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
function Main()
|
||||
|
||||
local short := "1234567890"
|
||||
local i, long, very_long, cNewLine
|
||||
LOCAL short := "1234567890"
|
||||
LOCAL i, long, very_long, cNewLine
|
||||
|
||||
long := short
|
||||
for i := 1 TO 12
|
||||
FOR i := 1 TO 12
|
||||
long += long
|
||||
next
|
||||
NEXT
|
||||
|
||||
very_long := long
|
||||
for i := 1 to 5
|
||||
FOR i := 1 TO 5
|
||||
very_long += very_long
|
||||
next
|
||||
NEXT
|
||||
|
||||
OutErr (len(short), len(long), len(very_long))
|
||||
Qout (len(short), len(long), len(very_long))
|
||||
OutErr( Len( short ), Len( long ), Len( very_long ) )
|
||||
QOut ( Len( short ), Len( long ), Len( very_long ) )
|
||||
|
||||
OutStd (hb_eol())
|
||||
OutStd (len(short), len(long), len(very_long))
|
||||
OutStd( hb_eol() )
|
||||
OutStd( Len( short ), Len( long ), Len( very_long ) )
|
||||
|
||||
OutStd (hb_eol())
|
||||
OutStd (hb_eol())
|
||||
OutStd (short)
|
||||
OutStd( hb_eol() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( short )
|
||||
|
||||
OutStd (hb_eol())
|
||||
OutStd (hb_eol())
|
||||
OutStd (long)
|
||||
OutStd( hb_eol() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( long )
|
||||
|
||||
OutStd (hb_eol())
|
||||
OutStd (hb_eol())
|
||||
OutStd (very_long)
|
||||
OutStd( hb_eol() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( very_long )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -1,95 +1,95 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "hbmath.ch"
|
||||
|
||||
function main()
|
||||
PROCEDURE Main()
|
||||
|
||||
local nOldMathErrMode
|
||||
local bOldMathErr
|
||||
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 ("")
|
||||
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( "" )
|
||||
|
||||
nOldMathErrMode := hb_MathErMode (HB_MATH_ERRMODE_USERDEFAULT)
|
||||
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 ("")
|
||||
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( "" )
|
||||
|
||||
hb_MathErMode (nOldMathErrMode)
|
||||
hb_matherMode( nOldMathErrMode )
|
||||
|
||||
bOldMathErr := hb_MathErBlock ({|nType, cFuncname, cError, nArg1, nArg2, aInfo|;
|
||||
localmatherr (nType, cFuncname, cError, nArg1, nArg2, aInfo)})
|
||||
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))
|
||||
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 ) )
|
||||
|
||||
hb_MathErBlock (bOldMathErr)
|
||||
hb_matherBlock( bOldMathErr )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
function localmatherr (nType, cFuncname, cError, nArg1, nArg2, aInfo)
|
||||
FUNCTION localmatherr( nType, cFuncname, cError, nArg1, nArg2, aInfo )
|
||||
|
||||
local cStr := "!! Local handling of math error MATH/"
|
||||
LOCAL cStr := "!! Local handling of math error MATH/"
|
||||
|
||||
cStr += alltrim(str(nType))+" in "+cFuncname+"("
|
||||
cStr += AllTrim( Str( nType ) ) + " in " + cFuncname + "("
|
||||
|
||||
if valtype(nArg1) == "N"
|
||||
cStr += alltrim(str(nArg1))
|
||||
endif
|
||||
if valtype(nArg2) == "N"
|
||||
cStr += ","+alltrim(str(nArg2))
|
||||
endif
|
||||
cStr += "):"
|
||||
qout (cStr)
|
||||
qout ("!! "+cError)
|
||||
if aInfo[HB_MATHERRORBLOCK_HANDLED]
|
||||
qout ("!! --> already handled with return value: "+;
|
||||
alltrim(str(aInfo[HB_MATHERRORBLOCK_RETVAL])))
|
||||
return 1
|
||||
endif
|
||||
IF ValType( nArg1 ) == "N"
|
||||
cStr += AllTrim( Str( nArg1 ) )
|
||||
ENDIF
|
||||
IF ValType( nArg2 ) == "N"
|
||||
cStr += "," + AllTrim( Str( nArg2 ) )
|
||||
ENDIF
|
||||
cStr += "):"
|
||||
QOut( cStr )
|
||||
QOut( "!! " + cError )
|
||||
IF aInfo[HB_MATHERRORBLOCK_HANDLED]
|
||||
QOut( "!! --> already handled with return value: " + ;
|
||||
AllTrim( Str( aInfo[HB_MATHERRORBLOCK_RETVAL] ) ) )
|
||||
RETURN 1
|
||||
ENDIF
|
||||
|
||||
qout ("!! setting return value to --> 5.0")
|
||||
QOut( "!! setting return value to --> 5.0" )
|
||||
|
||||
aInfo[HB_MATHERRORBLOCK_RETVAL] := 5.0
|
||||
aInfo[HB_MATHERRORBLOCK_HANDLED] := .T.
|
||||
aInfo[ HB_MATHERRORBLOCK_RETVAL ] := 5.0
|
||||
aInfo[ HB_MATHERRORBLOCK_HANDLED ] := .T.
|
||||
|
||||
return 1
|
||||
RETURN 1
|
||||
|
||||
@@ -19,7 +19,7 @@ MEMVAR mlLogicalT
|
||||
MEMVAR mlLogicalF
|
||||
MEMVAR mxStayHere
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
PRIVATE mcLongerNameThen10Chars := "Long String Name!"
|
||||
PRIVATE mcString := "This is a" + Chr(0) + "string to save."
|
||||
PRIVATE mnDouble := 100.0000
|
||||
@@ -70,7 +70,7 @@ FUNCTION Main()
|
||||
? mnDoubleH
|
||||
? __mvScope("mnInt")
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
#ifndef __HARBOUR__
|
||||
FUNCTION __mvScope()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "hbmemory.ch"
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
? "HB_MEM_CHAR " , MEMORY( HB_MEM_CHAR )
|
||||
? "HB_MEM_BLOCK " , MEMORY( HB_MEM_BLOCK )
|
||||
@@ -24,4 +24,4 @@ FUNCTION Main()
|
||||
? "HB_MEM_STACKITEMS" , MEMORY( HB_MEM_STACKITEMS )
|
||||
? "HB_MEM_STACK " , MEMORY( HB_MEM_STACK )
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
@@ -47,7 +47,7 @@ STATIC s_aScopes := { ;
|
||||
{ HB_FS_FRAME , "HB_FS_FRAME" } ;
|
||||
}
|
||||
|
||||
FUNCTION Main( cFrom )
|
||||
PROCEDURE Main( cFrom )
|
||||
|
||||
LOCAL hFile
|
||||
LOCAL cBlock := " "
|
||||
@@ -151,7 +151,7 @@ FUNCTION Main( cFrom )
|
||||
ENDIF
|
||||
SET( _SET_ALTERNATE, .F. )
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
PROCEDURE PrintItem( cSymbol, nType, nScope )
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ STATIC s_lCallBackStack
|
||||
STATIC s_lRTEDetails
|
||||
STATIC s_lObjectDump
|
||||
|
||||
FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
PROCEDURE Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
LOCAL uNIL := NIL
|
||||
LOCAL nInt01 := 98
|
||||
LOCAL nInt02 := 0
|
||||
@@ -117,7 +117,7 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
#endif
|
||||
|
||||
IF s_fhnd == F_ERROR
|
||||
RETURN 1
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
FWrite( s_fhnd, Set( _SET_DATEFORMAT ) + hb_eol() )
|
||||
@@ -721,7 +721,7 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
|
||||
FClose( s_fhnd )
|
||||
|
||||
RETURN 0
|
||||
RETURN
|
||||
|
||||
PROCEDURE TGetTOVS( o, aKeys, lInsert )
|
||||
LOCAL tmp, tmp1
|
||||
|
||||
@@ -91,7 +91,7 @@ STATIC s_lObjectDump
|
||||
STATIC s_lCatchErr
|
||||
STATIC s_lCheckResult
|
||||
|
||||
FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
PROCEDURE Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
|
||||
LOCAL o
|
||||
|
||||
@@ -127,7 +127,7 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
#endif
|
||||
|
||||
IF s_fhnd == F_ERROR
|
||||
RETURN 1
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
// ;
|
||||
@@ -279,7 +279,7 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
|
||||
FClose( s_fhnd )
|
||||
|
||||
RETURN 0
|
||||
RETURN
|
||||
|
||||
PROCEDURE TBRAssign( xVar )
|
||||
LOCAL o
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
#include "box.ch"
|
||||
|
||||
FUNCTION main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL ct
|
||||
|
||||
@@ -61,7 +61,7 @@ FUNCTION main()
|
||||
Scroll ( 1, 1, 11, 30, 0, 0 )
|
||||
pause()
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
FUNCTION pause()
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Donated to the public domain on 2001-03-08 by David G. Holm <dholm@jsd-llc.com>
|
||||
*/
|
||||
|
||||
FUNCTION Main( cParam )
|
||||
PROCEDURE Main( cParam )
|
||||
|
||||
LOCAL n, limit := 10
|
||||
|
||||
@@ -27,4 +27,4 @@ FUNCTION Main( cParam )
|
||||
OutStd( Seconds() )
|
||||
NEXT
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
REQUEST dbfntx
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
// for Clipper, this drags in the terminal driver
|
||||
@ Row(), Col() SAY ""
|
||||
@@ -82,7 +82,7 @@ FUNCTION Main()
|
||||
TestLine( "_SET_DIRSEPARATOR", 104 )
|
||||
#endif
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
PROCEDURE testline( c, n )
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#undef ASSOC_ARRAY
|
||||
#endif
|
||||
|
||||
function main()
|
||||
PROCEDURE Main()
|
||||
#ifndef NO_DBF_TEST
|
||||
field F_C, F_N, F_D
|
||||
#endif
|
||||
@@ -495,7 +495,7 @@ endif
|
||||
|
||||
#endif
|
||||
|
||||
return nil
|
||||
return
|
||||
|
||||
function dsp_time(s,t,tn)
|
||||
? padr(s,50)+str(max(hb_secondsCPU()-t-tn,0),8,2)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* Placed in the public domain
|
||||
*/
|
||||
|
||||
FUNCTION Main( cFrom, cTo )
|
||||
PROCEDURE Main( cFrom, cTo )
|
||||
|
||||
LOCAL oFrom
|
||||
LOCAL oTo
|
||||
@@ -54,7 +54,7 @@ FUNCTION Main( cFrom, cTo )
|
||||
oFrom:Dispose()
|
||||
oTo:Dispose()
|
||||
|
||||
RETURN nil
|
||||
RETURN
|
||||
|
||||
//
|
||||
// Generic DOS file handler
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
// while loop test
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL i := 0
|
||||
LOCAL cb := {|| QOut( "test" ) }
|
||||
@@ -12,7 +12,7 @@ FUNCTION Main()
|
||||
WHILE i < 1000
|
||||
QOut( i )
|
||||
Eval( cb )
|
||||
i ++
|
||||
i++
|
||||
END
|
||||
|
||||
RETURN nil
|
||||
RETURN
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "directry.ch"
|
||||
#include "fileio.ch"
|
||||
|
||||
FUNCTION Main( cOption, cCmd )
|
||||
PROCEDURE Main( cOption, cCmd )
|
||||
|
||||
LOCAL aDir, f, n, o, p, cRead
|
||||
|
||||
@@ -50,7 +50,7 @@ FUNCTION Main( cOption, cCmd )
|
||||
FWrite( o, ":END" + Chr( 13 ) + Chr( 10 ) )
|
||||
FClose( o )
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
FUNCTION TestIt( cFile )
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "inkey.ch"
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL oBrowse := TBRowseNew( 5, 5, 16, 30 )
|
||||
LOCAL aTest0 := { "This", "is", "a", "browse", "on", "an", "array", "test", "with", "a", "long", "data" }
|
||||
@@ -132,7 +132,7 @@ FUNCTION Main()
|
||||
SetColor( cColor )
|
||||
SetCursor( nCursor )
|
||||
|
||||
RETURN nil
|
||||
RETURN
|
||||
|
||||
#ifdef HB_COMPAT_C53
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
**/
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL oHTML := THTML():New()
|
||||
|
||||
@@ -35,7 +35,7 @@ FUNCTION Main()
|
||||
|
||||
oHTML:ShowResult()
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#define SECOND
|
||||
#define THIRD
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
QOut( "testing Harbour /d compiler flag" )
|
||||
|
||||
@@ -41,4 +41,4 @@ FUNCTION Main()
|
||||
QOut( "FIRST is not defined" )
|
||||
#endif
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
REQUEST __PP_STDRULES
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL cString, l_pp
|
||||
LOCAL i, j, aScript
|
||||
@@ -80,4 +80,4 @@ FUNCTION Main()
|
||||
CLS
|
||||
NEXT
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
@@ -106,58 +106,58 @@ RETURN
|
||||
|
||||
PROCEDURE SOMEPROC()
|
||||
|
||||
PRIVATE TEST AS NUMERIC
|
||||
PRIVATE TEST AS NUMERIC
|
||||
|
||||
M->TEST := 1
|
||||
M->TEST := 1
|
||||
|
||||
FOR M->TEST := 1 TO M->TEST + 10
|
||||
? "Correct warnings for FOR/NEXT"
|
||||
NEXT
|
||||
FOR M->TEST := 1 TO M->TEST + 10
|
||||
? "Correct warnings for FOR/NEXT"
|
||||
NEXT
|
||||
|
||||
REPLACE a WITH 1
|
||||
REPLACE a WITH 1
|
||||
|
||||
M->public_var := 0
|
||||
M->public_var := 0
|
||||
|
||||
b := 0
|
||||
b := 0
|
||||
|
||||
Var1 := 1
|
||||
Var1 := 1
|
||||
|
||||
if lGlobal = 0
|
||||
? 'lGlobal is NOT Numeric'
|
||||
endif
|
||||
IF lGlobal = 0
|
||||
? 'lGlobal is NOT Numeric'
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
RETURN
|
||||
|
||||
PROC MAIN1()
|
||||
PROCEDURE MAIN1()
|
||||
|
||||
PRIVATE OTHER, TEST AS STRING
|
||||
PRIVATE OTHER, TEST AS STRING
|
||||
|
||||
Var1 := M->TEST
|
||||
Var1 := M->TEST
|
||||
|
||||
Var2 := Test()
|
||||
Var2 := Test()
|
||||
|
||||
? Var1 + 2
|
||||
? Var1 + 2
|
||||
|
||||
M->TEST := 1
|
||||
M->TEST := "No Warning"
|
||||
M->TEST := 1
|
||||
M->TEST := "No Warning"
|
||||
|
||||
Test[ 1 ][ 2 ] := "Correct warning"
|
||||
Test[ 1 ][ 2 ] := "Correct warning"
|
||||
|
||||
RETURN
|
||||
RETURN
|
||||
|
||||
Function Test()
|
||||
RETURN .T.
|
||||
FUNCTION Test()
|
||||
RETURN .T.
|
||||
|
||||
Function Main2()
|
||||
Local n As Numeric, lVar AS LOGICAL
|
||||
FUNCTION Main2()
|
||||
Local n As Numeric, lVar AS LOGICAL
|
||||
|
||||
n := IIF( lVar, 'A', 3 ) //IIF() needs to be completed.
|
||||
n := 2
|
||||
n := 'a'
|
||||
n := Seconds() + 2
|
||||
n := Int( seconds() + 2 )
|
||||
n := IIF( lVar, 'A', 3 ) //IIF() needs to be completed.
|
||||
n := 2
|
||||
n := 'a'
|
||||
n := Seconds() + 2
|
||||
n := Int( seconds() + 2 )
|
||||
|
||||
Return( NIL )
|
||||
RETURN( NIL )
|
||||
|
||||
FUNCTION Main3()
|
||||
|
||||
@@ -232,16 +232,16 @@ FUNCTION SomeTest( lVar AS LOGICAL )
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN NIL
|
||||
RETURN NIL
|
||||
|
||||
Function nMyFunc( cVar AS STRING, nVar AS NUMERIC )
|
||||
FUNCTION nMyFunc( cVar AS STRING, nVar AS NUMERIC )
|
||||
|
||||
nVar := Val(cVar)
|
||||
nVar := Val(cVar)
|
||||
|
||||
RETURN nVar + 1
|
||||
RETURN nVar + 1
|
||||
|
||||
Function cOtherFunc( )
|
||||
RETURN 'Hello'
|
||||
FUNCTION cOtherFunc( )
|
||||
RETURN 'Hello'
|
||||
|
||||
Function ExtFun()
|
||||
RETURN 1
|
||||
FUNCTION ExtFun()
|
||||
RETURN 1
|
||||
|
||||
@@ -7,18 +7,18 @@ PROCEDURE Main()
|
||||
LOCAL nTime0, nTime, nTimeLast, nMin := 9999, nMax := - 9999, nTick := 0, nLoop := 0
|
||||
|
||||
? "Wait for 10 seconds..."
|
||||
nTimeLast := nTime0 := HB_MILLISECONDS()
|
||||
DO WHILE ( nTime := HB_MILLISECONDS() ) - nTime0 < 10000
|
||||
nTimeLast := nTime0 := hb_milliSeconds()
|
||||
DO WHILE ( nTime := hb_milliSeconds() ) - nTime0 < 10000
|
||||
IF nTimeLast != nTime
|
||||
nTick++
|
||||
nTick ++
|
||||
nMin := Min( nMin, nTime - nTimeLast )
|
||||
nMax := Max( nMax, nTime - nTimeLast )
|
||||
nTimeLast := nTime
|
||||
ENDIF
|
||||
nLoop++
|
||||
nLoop ++
|
||||
ENDDO
|
||||
nTime := nTimeLast - nTime0
|
||||
? "Ticks per second:", LTrim( Str( nTick * 1000/ nTime, 12, 3 ) )
|
||||
? "Ticks per second:", LTrim( Str( nTick * 1000 / nTime, 12, 3 ) )
|
||||
? "Min/avg/max interval (ms):", LTrim( Str( nMin, 9, 3 ) ), "/", ;
|
||||
LTrim( Str( nTime / nTick, 9, 3 ) ), "/", ;
|
||||
LTrim( Str( nMax, 9, 3 ) )
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL GetList := {}
|
||||
|
||||
@@ -33,4 +33,4 @@ FUNCTION Main()
|
||||
? "Is the person a singer:", iif( ly, "Yes", "No" )
|
||||
? "Your OS is", cItem
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
MEMVAR cStr, cStr_1, cVar_1, aVar, oVar, OtherVar, SomeVar, Private
|
||||
MEMVAR cMainPrivate, GlobalPrivate, BornInRunTimeVar, Public
|
||||
|
||||
FUNCTION Main( )
|
||||
PROCEDURE Main()
|
||||
|
||||
PRIVATE cStr := 'cVar', cStr_1 := 'cVar_1', aVar := { 'cVar_1' }, oVar
|
||||
|
||||
@@ -49,7 +49,7 @@ FUNCTION Main( )
|
||||
|
||||
TEST_TYPE()
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
FUNCTION TValue
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#pragma BadPragma=off
|
||||
#pragma /Y+
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
#pragma Shortcut=On
|
||||
|
||||
@@ -54,4 +54,4 @@ FUNCTION Main()
|
||||
/* Pragmas with bad values will cause an error */
|
||||
#pragma WarningLevel=8
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* Donated to the public domain by
|
||||
Viktor Szakats (harbour syenar.net) */
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
QOut( ["'/* bumbulda */45]="k" )
|
||||
|
||||
@@ -16,4 +16,4 @@ FUNCTION Main()
|
||||
|
||||
* Comments beginning with "*"
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#define HB_VCOL 2
|
||||
#define HB_PROMPT 3
|
||||
|
||||
FUNCTION MAIN()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL nMode := 1, nRow, lSuccess
|
||||
LOCAL aVModes := { ;
|
||||
@@ -55,7 +55,7 @@ FUNCTION MAIN()
|
||||
|
||||
QUIT
|
||||
|
||||
RETURN 0
|
||||
RETURN
|
||||
|
||||
//*************************
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ STATIC nDispCount := 0
|
||||
|
||||
#endif
|
||||
|
||||
FUNCTION Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL aResult := {}
|
||||
|
||||
@@ -56,7 +56,7 @@ FUNCTION Main()
|
||||
// Display Results
|
||||
Summary( aResult )
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
// initialise the screen
|
||||
|
||||
|
||||
Reference in New Issue
Block a user