Hi,
I am new to C in UNIX.
I am trying to understanding the C code someone wrote 10 years ago and hoping to get it work again.
While reading his code, I found 'iret ' variable, what does this normally mean?
looks like its integer, but why called ret?
....
int iret;
FILE *perlptr;
iret = pclose(perlptr);
....
Thanks for your help.
As long as you understand what the code is doing it is not really necessary to understand why the programmer choose a name for a variable. I often use variables like j or k for relatively unimportant variables. That said, I also might use iret in that particular situation. The "ret" stands for "return code". The i is because, in fortran, variables that start with i through n are automatically typed as integer. The author may (like me) be a former fortran programmer.