Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug, FSEEK does't move the pointer without errors
Message
From
11/02/2006 06:08:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Bug, FSEEK does't move the pointer without errors
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01095624
Message ID:
01095624
Views:
49
Normally I write perfect programs,
but I would like to have the liberty to make errors and to realize me of it.
#DEFINE FILENAME "$$$$.$$$"

CLEAR
CLEAR ERROR 
TRY 
	=STRTOFILE("A",FILENAME )
	H=FOPEN(FILENAME)
	IF H>0
		? "h is readonly, and I can move the end pointer everywhere ", FSEEK(H,10000000,2),FSEEK(h,-1,1)
		? "if I don't overcome the beginning, the pointer is    moved",FSEEK(H,0,2) at 60,FSEEK(H,-1,2)

		* bug
		? "if I do    overcome the beginning, the pointer isn't moved",FSEEK(H,0,2) at 60,FSEEK(H,-2,2), " expected 0 or -1"
		? "return is good, and no ERRORS", AERROR(AX),"then i cannot known this fact"
		? " then the program must to use only nBytesMoved bounded on negative values , otherwise results are unpredictable "
		FCLOSE(H)
	ENDIF
FINALLY
	ERASE FILENAME 
ENDTRY
thanks
Reply
Map
View

Click here to load this message in the networking platform