Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug on memo update
Message
From
13/10/2004 08:04:22
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
Bug on memo update
Miscellaneous
Thread ID:
00950993
Message ID:
00950993
Views:
71
Bug/Issue : 1 of 22

This is present on VFP6-7-8-9

Expected results : a fixed 1.00 ratio

Repro code:
CLEAR
CLOSE DATABASES ALL
SET TALK OFF
fillSize = 0
FOR nBlockSize=1 TO 1024 STEP 0

	SET BLOCKSIZE TO M.nBlockSize && M.nBlockSize

	? 'BLOCKSIZE :',SET("Blocksize")


	nSize = SET("Blocksize") && use A SINGLE BLOCKSIZE

	FillMemo()
	
	PrintMemoSize("Start Memo Size")
 
	* choice a fixed random bound size
	upSize=INT(RAND()*m.nSize)
	FOR k=0 TO m.nSize
		replace memotest WITH SPACE(m.upSize)
	NEXT
	PrintMemoSize("Update Memo with a Fixed Size")
	eraseTable()

	* refill with a top down size
	FillMemo()
	FOR k=0 TO m.nSize
		replace memotest WITH SPACE(m.nSize-m.k)
	NEXT
	PrintMemoSize("Update Memo with a top down Size")
	eraseTable()

	* refill with a round bouded size
	FillMemo()
	FOR k=0 TO m.nSize
		replace memotest WITH SPACE(INT(RAND()*m.nSize))
	NEXT
	PrintMemoSize("Update Memo with a random bound Size")
	eraseTable()

	* refill with a bottom up size
	FillMemo()
	FOR k=0 TO m.nSize
		replace memotest WITH SPACE(m.k)
	NEXT
	PrintMemoSize("Update Memo with a bottom up Size:")
	eraseTable()
	nBlockSize=2*M.nBlockSize
NEXT
*************************************

PROCEDURE FillMemo
CREATE TABLE SYS(2023)+"\mytable" FREE (memotest M)
INSERT INTO (ALIAS()) VALUES (SPACE(m.nSize))

SET COMPATIBLE on
fillSize =FSIZE(FORCEEXT(DBF(),"fpt"))
SET COMPATIBLE off
ENDPROC

PROCEDURE eraseTable
USE
DROP TABLE SYS(2023)+"\mytable"

PROCEDURE PrintMemoSize(prefix)
	SET COMPATIBLE on
	? m.prefix+", Memo size factor:",STR(FSIZE(FORCEEXT(DBF(),"fpt"))/m.fillSize,8,2)  at 50
	SET COMPATIBLE off
ENDPROC
Next
Reply
Map
View

Click here to load this message in the networking platform