•  Back 
  •  File functions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File5.10.23  Fread                                                     TOS

 Name:         »file read« - Read from a file.

 Opcode:       63

 Syntax:       int32_t Fread ( int16_t handle, int32_t count, void 
               *buf );

 Description:  The GEMDOS routine Fread reads a given number of bytes 
               from a file. The following apply:

                Parameter  Meaning

                handle     File handle identifier
                count      Number of bytes of data to read
                buf        Address of the receiving buffer (at least 
                           count bytes long)

               Note: In all GEMDOS Versions < 0.15 the system will 
               freeze if the parameter count has a value of 0. When 
               reading from standard channels, a maximum of 16383 
               characters may be read.

 Return value: The function returns either a positive number showing 
               the number of bytes actually read, which may be lower 
               than count if an EOF (end of file) was encountered, or 
               a negative GEMDOS error-code:

                EIHNDL :   Wrong file handle
                ELOCKED :  File segment is marked as locked

 Availability: All GEMDOS versions.

 Group:        File functions

 See Also:     Binding   Fwrite   FIONREAD