English
Chinese
  yTin Online Help  

  Home (english) | Home (chinese) | Downloads | Sample scripts | Online help | Utilities | FAQs | Discussions/Messages | Mud&links | My Progs | Mirrors |
fread

format:            #fread {buffer} {1} {length) {FILE}

FILE is $_ from #fopen.
The variable _ is set to the number of items successfully read.

If an error occurs, or the end-of-file is reached, the return
value is a short item count (or zero).
fread does not distinguish between end-of-file and   error

length is limited to 2048.

See help on C function: size_t   fread(   void *ptr, size_t size, size_t nmemb, FILE *stream);

See also: #fopen/#fclose, #feof, #fseek, #fgets, #fputs, #fread, #fwrite, #remove, #rename, #sysecho