reading text from external files 
Author Message
 reading text from external files

Hi,

I am trying to find an elegent way to determine where the end of
a text file I am reading from is. Right now, I am using the readline
utility from the textio package to read lines from an external file.
My goal is to avoid having to add explicit text at the end of the
file indicating the end of file (such as "END").

Thanks!



Fri, 23 Apr 2004 22:55:55 GMT  
 reading text from external files

What about?:

  procedure load_substable (
    constant file_name : in    string
  ) is
    file input_file          : TEXT open READ_MODE is file_name;
    variable line_in_buffer  : line;
  begin -- procedure load_substable
    while not ( endfile ( input_file ) ) loop
      readline ( input_file , line_in_buffer ) ;
--------------------------------------------------------------------------------
      -- Pase line_in_buffer here.
--------------------------------------------------------------------------------
    end loop ; -- not endfile...

Quote:

> Hi,

> I am trying to find an elegent way to determine where the end of
> a text file I am reading from is. Right now, I am using the readline
> utility from the textio package to read lines from an external file.
> My goal is to avoid having to add explicit text at the end of the
> file indicating the end of file (such as "END").

> Thanks!

--
Francisco Camarero
Hardware Engineer
---------------------------------------------


Fri, 23 Apr 2004 23:04:04 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. reading an external text file

2. fortran program reading an external text (and numbers) file and writing with edits

3. How do I read lines of Text from Text File and add them to Array

4. Reading fortran text files / Parsing ascii files/ Help!!

5. reading in external file in clarion4 eval

6. Reading External .txt files in Quartus II

7. reading variables from an external file using expect

8. (Newbie) Reading Text Files....

9. Reading data from a text file to store in a collection

10. VW: Reading text from Word 97 files

11. Reading arguements from the text file with irregular formats

12. Reading from a text file

 

 
Powered by phpBB® Forum Software