**CIGAL Reference Manual, Chapter 6 (RealTime): r_fread** ===== r_fread -- Read data from a file ===== **usage: r_fread opflg eflag ltime Databuf Nbytes Lunit [Asyncflag]** R_FREAD is a REALTIME operator. It initiates a data transfer of NBYTES from the open file specified by LUNIT to the DATABUF variable. NBYTES is assumed to be a long integer value. LUNIT must have been previously set by a call to R_FOPEN. If LUNIT is missing it defaults to 1. R_FREAD normally operates synchronously, not finishing until the data transfer is completed. To perform an asynchronous read, make ASYNCFLAG non-zero. In that case you should issue a R_FWAIT operation before assuming that the data have all been read. Note 1: If LUNIT is not an open file this operation returns immediately. If a previous asynchronous I/O operation was still pending, this operation will wait until that has completed before starting. This is therefore equivalent to inserting a R_FWAIT operation. Note 2: All REALTIME file I/O operations are performed asynchronously, regardless of the ASYNCFLAG; this allows multiple independent processing streams to continue while file data transfers are underway. The ASYNCFLAG option therefore only specifies whether this particular processing stream should wait until the I/O finishes. **See Also:**\\ [[jvs:cigal|CIGAL Home]], [[jvs:cigal:manual|CIGAL Manual]], [[jvs:cigal:manual:chapter6|RealTime List]], [[jvs:cigal:manual:help|Manual Help]]