comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Diagnostic printout
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Diagnostic printout [message #2502] Thu, 04 August 1994 10:19 Go to previous message
mjfreem is currently offline  mjfreem
Messages: 2
Registered: August 1994
Junior Member
I want to be able to print a diagnostic message that tells me
what loop index my routine is on, without having the screen
scroll by. Something equivalent to this:

#include <stdio.h>
main(){
int i,j,a;
for (i=0;i<10;i++){
printf("Processing index number %i \r",i);
a=fflush(NULL);
for (j=0;j<10000000;j++);
}
printf("\n");
}

The j loop is there to waste time, so you can see the numbers iterate.
The a=fflush(NULL) is to make sure the output buffer gets written to the
screen.

I tried
print,format='(t1,"Processing index number ",i2,$),i
but it doesn't work right. Basically, there is no eqivalent to \r
that I can find in IDL.

Thanks, matt
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: HELP files (generation of?)
Next Topic: How to read a file in zip or gz format using IDL?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 11:36:58 PST 2025

Total time taken to generate the page: 1.84107 seconds