[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] "break" statement in AFL



PureBytes Links

Trading Reference Links

Dan,

Glad you have it working.


> while( ! feof( fh ) OR sDateString == "")

Just realised the above statement should have been:

while( ! feof( fh ) AND sDateString == "")



Regards,
William Peters
http://www.amitools.com




Friday, December 23, 2005, 10:04:51 PM, you wrote:
WP>    Dan,

WP>  I wasn't sure exactly when you wanted to exit the loop but this will
WP>  exit when the sDateString var contains a string or the loop reaches EOF.


WP>  fh = fopen( "C:\\Program Files\\AmiBroker\\LookupData\\" + Symbol + ".csv ", "r");
WP>  sDateString = "";
WP>  if( fh ) 
WP>          { 
WP>          while( ! feof( fh ) OR sDateString == "") 
WP>                  { 
WP>                  CurRow = fgets( fh );
WP>                  if (StrExtract(CurRow, 0) == "YHEDDate")
WP>                          sDateString = StrExtract(CurRow, 1);
WP>                  } 
WP>          fclose( fh ); 
WP>  }






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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:
    http://docs.yahoo.com/info/terms/