* contrib/gtwvg/tests/_wvtcls.prg
* contrib/gtwvg/tests/demowvg.prg
* contrib/hbct/doc/en/dattime3.txt
* contrib/hbct/tests/datetime.prg
* contrib/hbnf/doc/en/acctadj.txt
* contrib/hbnf/doc/en/acctmnth.txt
* contrib/hbnf/doc/en/acctqtr.txt
* contrib/hbnf/doc/en/acctweek.txt
* contrib/hbnf/doc/en/acctyear.txt
* contrib/hbnf/doc/en/dayofyr.txt
* contrib/hbnf/doc/en/daytobow.txt
* contrib/hbnf/doc/en/elapsed.txt
* contrib/hbnf/doc/en/firstday.txt
* contrib/hbnf/doc/en/lastday.txt
* contrib/hbnf/doc/en/madd.txt
* contrib/hbnf/doc/en/month.txt
* contrib/hbnf/doc/en/qtr.txt
* contrib/hbnf/doc/en/savearr.txt
* contrib/hbnf/doc/en/setdate.txt
* contrib/hbnf/doc/en/wda.txt
* contrib/hbnf/doc/en/week.txt
* contrib/hbnf/doc/en/workdays.txt
* contrib/hbnf/doc/en/woy.txt
* contrib/hbnf/doc/en/year.txt
* contrib/hbnf/tests/elapsed.prg
* contrib/hbnf/tests/savearr.prg
* contrib/hbnf/tests/setdate.prg
* contrib/hbnf/tests/wda.prg
* contrib/hbnf/tests/workdays.prg
* contrib/hbnf/tests/woy.prg
* contrib/hbpgsql/tests/dbf2pg.prg
* contrib/hbsqlit3/hdbcsqlt.prg
* contrib/rddsql/tests/arrayrdd.prg
* doc/en/datetime.txt
* doc/en/math.txt
* doc/en/string.txt
* doc/hdr_tpl.txt
* extras/gtwvw/tests/ebtest7.prg
* extras/gtwvw/tests/wvwtest9.prg
* extras/guestbk/inifiles.prg
* extras/hbvpdf/core.prg
* extras/httpsrv/cgifunc.prg
* tests/array16.prg
* tests/bldtest/bldtest.c
* tests/byref.prg
* tests/dates.prg
* tests/gfx.prg
* tests/inifiles.prg
* tests/initexit.prg
* tests/longdev.prg
* tests/parseini.ini
* tests/parseini.prg
* tests/usrrdd/exarr.prg
* website/samples/byref.prg.html
* website/samples/initexit.prg.html
* website/samples/longdev.prg.html
* website/samples/mousetst.prg.html
* website/samples/parseini.ini.html
* website/samples/parseini.prg.html
* various cleanups
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
// Testing Harbour long string handling with device output.
|
|
|
|
/* Harbour Project source code
|
|
http://harbour-project.org/
|
|
Donated to the public domain on 2001-03-08 by David G. Holm <dholm jsd-llc com>
|
|
*/
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL cShort := "1234567890"
|
|
LOCAL i, cLong, cBuffer, nHandle
|
|
|
|
// Create an 80 KB string (Clipper is limited to 64 KB).
|
|
cLong := cShort
|
|
FOR i := 1 TO 13
|
|
cLong += cLong
|
|
NEXT
|
|
|
|
// Write the long string to file long_str.prn
|
|
SET PRINTER TO long_str
|
|
SET DEVICE TO PRINTER
|
|
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" )
|
|
cBuffer := cLong
|
|
? "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 )
|
|
? "The strings are", iif( cLong == cBuffer, "equal", "not equal" )
|
|
|
|
RETURN
|