Subject: Re: CP-007 and CP-008: textio for std_logic_1164
From: Jim Lewis (Jim@synthworks.com)
Date: Thu Feb 20 2003 - 06:51:48 PST
What I want is something that says newline. Where
if I remember right, newline = LF for UNIX, and
CR&LF or LF&CR for Windows (can't remember which).
Perhaps, NL would be a better acronym. You could
use your argument to say separate things for Unix and
Windows are not needed.
Cheers,
Jim
Peter Ashenden wrote:
> On Thu, 2003-02-20 at 17:46, Jim Lewis wrote:
>
>
>>With write, it would be nice to be able to insert the
>>appropriate LF, CR, or CRLF depending on what the particular
>>OS would prefer to see. To deal with this, I would like
>>to define a string constant in std.textio named something like
>>CRLF. With this, inserting a newline in either OS would become:
>>
>>write(Output, "%%%ERROR data value miscompare in CpuModel." &
>> CRLF & " Actual data value = " & to_hstring(Data) &
>> CRLF & " Expected data value = " & to_hstring(ExpData) &
>> CRLF & " at time: " to_string(now, right, 12) ) ;
>
>
> You can already do this. Both CR and LF are enumeration values in
> CHARACTER. You can concatenate a character to a string, so the
> following would work:
>
> write(Output, "%%%ERROR data value miscompare in CpuModel." &
> CR & LF & " Actual data value = " & to_hstring(Data) &
> CR & LF & " Expected data value = " & to_hstring(ExpData) &
> CR & LF & " at time: " to_string(now, right, 12) ) ;
>
> Cheers,
>
> PA
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jim Lewis Director of Training mailto:Jim@SynthWorks.com SynthWorks Design Inc. http://www.SynthWorks.com 1-503-590-4787Expert VHDL Training for Hardware Design and Verification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This archive was generated by hypermail 2b28 : Thu Feb 20 2003 - 06:53:58 PST