Dave,
If std.textio contains routines for all the types defined in the base language (that is pre-1164, etc. packages being incorporated into 1076), then the routines for reading and writing REAL values should be in that package.
UNLESS, there's some value in placing them in the fixed and floating point packages. You have only expressed a personal preference to put them there. Are there any benefits?
I don't know about SREAD, but there's a need for an SWRITE or some way to allow:
Write( out_file, "my_string" );
Without the need for type qualifying the string literal. That type qualification annoys me to no end. If there's an SWRITE for this purpose, then I suspect the SREAD is provided for orthoganality as well as adding the length output parameter. Perhaps someone else knows better the history.
-Steve Bailey
> -----Original Message-----
> From: owner-vhdl-200x-ft@eda.org
> [mailto:owner-vhdl-200x-ft@eda.org <mailto:owner-vhdl-200x-ft@eda.org> ] On Behalf Of David Bishop
> Sent: Friday, June 25, 2004 1:48 PM
> To: vhdl-200x-ft@eda.org
> Subject: [vhdl-200x-ft] Question on FT-08
>
>
> I am currently creating the updated "std.textio" package, and
> looking at FT-08 I have some questions/comments:
>
> 1)
> constant NL : string := LF ;
> constant CRLF : string := LF ; -- OS dependent constant
> to be CRLF
>
> This belong in the package "std.standard". I have them
> looking like this:
>
> constant NL : string := (1 => character'val(10)) ; -- LF
> constant CRLF : string := (1 => character'val(10)) ; --
> OS dependent constant to be CRLF
> -- constant CRLF : string := (1 => character'val(13), 2 =>
> character'val(10)) ; -- OS dependent constant to be CRLF
> 2)
> -- Read and Write procedures for String values
> procedure SREAD (L: inout LINE; VALUE: out STRING;
> STRLEN: out natural; GOOD : out BOOLEAN);
> procedure SREAD (L: inout LINE; VALUE: out STRING;
> STRLEN: out natural);
>
> There already is a "READ" for type string, but there is no
> output "STRLEN".
> You can get the length by just looking at the 'lenght of the
> string returned.
> Why do we need the extra function.
>
> 3)
>
> procedure HREAD (L: inout LINE; VALUE: out REAL; GOOD
> : out BOOLEAN);
> procedure HREAD (L: inout LINE; VALUE: out REAL);
> procedure HWRITE (L: inout LINE; VALUE: in REAL;
> JUSTIFIED: in SIDE := RIGHT; FIELD:in
> WIDTH := 0);
> procedure OREAD (L: inout LINE; VALUE: out REAL; GOOD
> : out BOOLEAN);
> procedure OREAD (L: inout LINE; VALUE: out REAL);
> procedure BREAD (L: inout LINE; VALUE: out REAL; GOOD
> : out BOOLEAN);
> procedure BREAD (L: inout LINE; VALUE: out REAL);
> procedure BWRITE (L: inout LINE; VALUE: in REAL;
> JUSTIFIED: in SIDE := RIGHT; FIELD:in
> WIDTH := 0);
> procedure DREAD (L: inout LINE; VALUE: out REAL; GOOD
> : out BOOLEAN);
> procedure DREAD (L: inout LINE; VALUE: out REAL);
> procedure DWRITE (L: inout LINE; VALUE: in REAL;
> JUSTIFIED: in SIDE := RIGHT; FIELD:in
> WIDTH := 0);
>
> "Real" depends. Fixed or floating point?
> I would rather handel these in my fixed and floating point
> packages. I can just do a "real" conversion right in the
> read/write routine.
>
>
> --
> David W. Bishop dbishop@vhdl.org All standard disclaimers apply.
>
>
Received on Fri Jun 25 13:08:05 2004
This archive was generated by hypermail 2.1.8 : Fri Jun 25 2004 - 13:08:06 PDT