Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Writing null into file

Reply
Thread Tools

Writing null into file

 
 
Przemysław Elias
Guest
Posts: n/a
 
      07-06-2010
Hi,

Is it possible to put a ASCII 0 character, which is NULL.
I'm trying to use it in a testbench with a write(line,
character'val(0)); function from std.textio library, but it simply
doesn't work this way.
Any ideas?
 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      07-06-2010
Przemys?aw Elias wrote:
> Hi,
>
> Is it possible to put a ASCII 0 character, which is NULL.
> I'm trying to use it in a testbench with a write(line,
> character'val(0)); function from std.textio library, but it simply
> doesn't work this way.
> Any ideas?


Maybe

constant newline_c : string := (1 => NUL);


-- Mike Treseler
 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      07-06-2010
Mike Treseler wrote:

> constant newline_c : string := (1 => NUL);



If that works, you might want to change the name to null_c

-- Mike Treseler
 
Reply With Quote
 
KJ
Guest
Posts: n/a
 
      07-08-2010
On Jul 6, 4:51*pm, Przemysław Elias <pempus...@gmail.com> wrote:
> Hi,
>
> Is it possible to put a ASCII 0 character, which is NULL.


You're confused, ASCII 0 character is exactly that, the ASCII
character '0'...which is a byte that has the decimal value of 48, hex
value of 0x30.

> I'm trying to use it in a testbench with a write(line,
> character'val(0)); function from std.textio library, but it simply
> doesn't work this way.
> Any ideas?


Whether writing the ASCII character '0' or the NUL character, works
for me using std.textio functions.

Kevin Jennings
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
file reader returning null when file is not null content jason Java 13 05-14-2010 01:50 AM
transforming from a non-null terminated string into a null terminatedstring ssylee C Programming 4 08-12-2008 09:57 PM
"stringObj == null" vs "stringObj.equals(null)", for null check?? qazmlp1209@rediffmail.com Java 5 03-29-2006 10:37 PM
Any problems with writing the information into a file - Multi-users perform writing the same file at the same time ???? HNguyen ASP .Net 4 12-21-2004 01:53 PM
Need to concatenate all files in a dir together into one file and read the first 225 characters from each file into another file. Tony Perl Misc 5 04-19-2004 03:28 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57