Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FEOF() always returns True
Message
From
05/09/2004 11:22:20
 
 
To
04/09/2004 22:40:25
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00939501
Message ID:
00939570
Views:
16
>Hi Peter,
>
>I hope you had a good sleep.

Mwaah.. many related dreams.. not many solutions this time. :)

>From the evidence it appears that FEOF is being determined based on 'current byte position' versus file 'size'. In this case the file size (VALUE) is smaller that the 'current byte position', so EOF. Wouldn't you say?

The fseek( lnHr, 0, 2) returns 0 indeed. The funny thing is that fseek(lnHr,2^31) nicely moves the byte pointer to that 2Gig position. IMO, fseek(,,2) should not return 0 on files that are over 2Gig, but it should return 2Gig or so. I am aware of the standpoint of the foxteam that there will be no support for files over 2Gig, but that's no justification for delivering functions that return false values on files over 2Gig, don't you think?!

>cheers
>
>>Hi Tore,
>>
>>It's now 3:35 and yes, I'm still at work. ;)
>>
>>Indeed, I have several problems currently, some related to files that are over 2Gig, others related to insufficient support for network mappings. For example, I just wrote the routine BetterDiskSpace(). This function also returns the amount of free bytes on a NETWORK MAPPING. The VFP diskspace() function only works fine for drive letters.
>>
>>The fopen() function reads fine as long as the 2Gig barrier is not reached. So, I think that feof() should work fine uptill that moment too, don't you think?!
>>
>>I go to bed now. |) ( the | should represent closed eyes )
>>
>>>Hi Peter,
>>>
>>>working late today? :-)
>>>
>>>Since VFP does not support any file that is over 2GB, NO info or No function or command regarding and/or affecting such files can be trusted. Period.
>>>
>>>>Hi All,
>>>>
>>>>In the case of a file that's over 2Gig FEOF() always returns True, even when FGETS() successfully returns a (first line) string. Is this a bug?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform