Naming: fp

Skip Montanaro skip at mojam.com
Sat Nov 20 15:21:19 CET 1999


    >> A file object fp that  points to the mailbox file.
    Gerrit> Why is a file object often called 'fp'?

Stdio's basic data structure is a struct called FILE.  It's always exposed
as a FILE * (or file pointer), hence the propensity to name variables of
type FILE * "fp":

     #include <stdio.h>
     ...
     char * filename = "/tmp/trash";
     FILE *fp = fopen(filename);
     ...

Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
847-971-7098   | Python: Programming the way Guido indented...




More information about the Python-list mailing list