A question about std.textio 
Author Message
 A question about std.textio

I was looking at the definition of the textio package in the `93 LRM,
and noticed that some of the functions (readline, writeline, endfile)
are defined for type "TEXT". "TEXT" is a file type is type mark of
"STRING". My question is, how then, are files of types other than
"STRING" handled?  The simulators I have access to will write files
of bits, integers, or whatever - where is this addressed?

Thanks,
        Dale

--
+----------------------------------------------------------------------+
| Dale E. Martin | University of Cincinnati Savant Research Laboratory |

+----------------------------------------------------------------------+



Mon, 26 Apr 1999 03:00:00 GMT  
 A question about std.textio

Quote:

> I am not sure what you mean by writing files of "bits, integers, or
> whatever", but a file may be opened as TEXT or ASCII type and from
> these files you may read a LINE from which you may read a CHARACTER.
> If you are running on a UNIX platform, just declare your files as TEXT
> type and I think you will be fine if you read LINEs from them.

Acutally, I answered my own question by looking closer in the LRM.
Page 48 of the `93 LRM shows that some implicit procedure and function
declarations get generated upon the creation of a new file type.
These implicit subprograms allow the reading and writing of files with
types like:

type FT is file of NATURAL;
type FT is file of BIT;

(which the textio functions don't define procedures or functions for)

Thanks,
        Dale

--
+----------------------------------------------------------------------+
| Dale E. Martin | University of Cincinnati Savant Research Laboratory |

+----------------------------------------------------------------------+



Mon, 26 Apr 1999 03:00:00 GMT  
 A question about std.textio

Quote:

> I was looking at the definition of the textio package in the `93 LRM,
> and noticed that some of the functions (readline, writeline, endfile)
> are defined for type "TEXT". "TEXT" is a file type is type mark of
> "STRING". My question is, how then, are files of types other than
> "STRING" handled?  The simulators I have access to will write files
> of bits, integers, or whatever - where is this addressed?

> Thanks,
>         Dale

I am not sure what you mean by writing files of "bits, integers, or
whatever", but a file may be opened as TEXT or ASCII type and from
these files you may read a LINE from which you may read a CHARACTER.
If you are running on a UNIX platform, just declare your files as TEXT
type and I think you will be fine if you read LINEs from them.


Mon, 26 Apr 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Xilinx and std.textio.lib

2. std.textio -> endline

3. STD library and TEXTIO package

4. std.textio.all

5. Std:Cut, Std:Copy, Std:Paste - Don't work at all

6. Std:Copy, Std:Paste, Std:cut problems

7. question about textio

8. textio WRITE() question

9. STD:Cut, STD:Copy & Paste in CW2

10. MIL-STD-973 & MIL-STD-498 issue

11. Should MIL-STD-498 replace DOD-STD-2167A?

12. Std ML question

 

 
Powered by phpBB® Forum Software