Writing null into file

  • Thread starter Przemys³aw Elias
  • Start date
P

Przemys³aw Elias

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?
 
M

Mike Treseler

Przemys?aw Elias said:
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
 
K

KJ

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top