DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: FOR statement problem

  1. #1
    Join Date
    Dec 2004
    Location
    Porto - Portugal
    Posts
    42

    FOR statement problem

    Hi,

    I'm having this problem with a FOR statement. The routine is this:

    Code:
    for(icount2 = tdb * 1440;icount2 < tdb * 1440 + step * increment ;icount2 += increment){
    
    		  IFLAG = kp_star(star,icount2 / 1440,FLAG,xx,serr);
    
    		  dist = xx[2];
    
    		  if (flag_horizontal < 1){
    
    			  fprintf(file_out, "%12.9lf;%12.9lf;%12.9lf;%12.9lf;%12.9lf;%12.9lf;%12.9lf;%12.9lf\n",
    				  kp_tdb2utc(icount2 / 1440),icount2 / 1440,xx[0],xx[1],xx[2],xx[3],xx[4],xx[5]);
    
    		  } else {...
    Note that the increment and step are already in the beginning because they didn't increment anything!
    The problem is kp_tdb2utc, a dll function, that works perfectly - I've tested it in a FOR statement outside; but for some reason, in this loop it returns only the first value - like the first problem with increment and step.

    Is there anyway to get around this problem?

    Regards,

    Kepler

  2. #2
    Join Date
    Dec 2003
    Posts
    3,366
    can you explain the problem again? increment and step are already *what*? The problem is unclear.

    Did you try printing increment inside the loop each time?

Similar Threads

  1. Replies: 11
    Last Post: 06-14-2010, 12:30 AM
  2. Memory problem with Borland C3.1
    By AZ1699 in forum C++
    Replies: 11
    Last Post: 11-16-2007, 01:23 PM
  3. App Problem with MS Office ...
    By Shannon in forum VB Classic
    Replies: 7
    Last Post: 06-24-2007, 08:47 PM
  4. Replies: 0
    Last Post: 12-13-2001, 01:06 PM
  5. Arabic problem view
    By Ayman in forum VB Classic
    Replies: 0
    Last Post: 04-03-2000, 01:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center