PureBytes Links
Trading Reference Links
|
You
might try something like this:
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Reading the docs on FGETS there is some code that will read a file of
strings until eof is reached:
<FONT face=Arial color=#0000ff
size=2>
fh = <FONT
color=#0000ff>fopen( <FONT
color=#ff00ff>"quotes.csv", <FONT
color=#ff00ff>"r");
if<FONT
face="Courier New">( fh ) {
while<FONT
color=#000000>( ! feof<FONT
face="Courier New">( fh ) ) {
<FONT
color=#0000ff>printf( <FONT
color=#0000ff>fgets(
fh ) ); } }
<FONT
color=#000000>
<FONT face=Arial
color=#0000ff size=2>Test this code to see if the variable "fh" contains the
last string (line) of data after the eof is detected. I doubt if you can just
read the last line.
<FONT face=Arial
color=#0000ff size=2>
<FONT face=Arial
color=#0000ff size=2>d
<FONT
face=Tahoma size=2>-----Original Message-----From: Ara Kaloustian
[mailto:ara1@xxxxxxxxxx] Sent: Monday, January 05, 2004 12:02
PMTo: Ami-MainSubject: [amibroker] AFL -
fgets()
Does anyone know if fgets() function reads the
first or last line of a file?
if it reads the first line, how would I position
it to read the last line only?
Thanks
AraSend BUG REPORTS to
bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
To visit your group on the web, go to:<A
href="">http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:<A
href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|