Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > empty array litteral

Reply
Thread Tools

empty array litteral

 
 
JR
Guest
Posts: n/a
 
      07-13-2011
Hi all!

According to std.standard:

TYPE string IS ARRAY ( positive RANGE <> OF character);

"hello" is a valid string litteral
"" is a valid string litteral too, it is the empty string.


Let

TYPE foo IS ARRAY ( positive RANGE <> OF integer);

(0, 1, 1, 2, 3, 5) is a valid foo litteral

What is the litteral for an empty foo?

Thx

Julien
 
Reply With Quote
 
 
 
 
Tricky
Guest
Posts: n/a
 
      07-13-2011
> Hi all!
>
> According to std.standard:
>
> TYPE string IS ARRAY ( positive RANGE <> OF character);
>
> "hello" is a valid string litteral
> "" is a valid string litteral too, it is the empty string.
>
> Let
>
> TYPE foo IS ARRAY ( positive RANGE <> OF integer);
>
> (0, 1, 1, 2, 3, 5) is a valid foo litteral
>
> What is the litteral for an empty foo?
>
> Thx
>
> Julien

That is an interesting question.

You can make a null constant like this:

constant NULL_FOO : foo(1 downto 2) := (others => 0);

then use the constant in place of a literal.
 
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
cant rename a litteral in IDE? Smokey Grindle ASP .Net 0 06-20-2006 06:02 PM
Altova Mapforce - xml 2 xml map: empty elements output although input element is not empty Lukas XML 3 11-10-2005 02:25 PM
empty lists vs empty generators Brian Roberts Python 12 05-04-2005 08:59 PM
Check if a directory is empty and empty it Marcia Hon C Programming 8 02-14-2004 03:53 AM
empty/non-empty element John XML 1 07-16-2003 10:23 AM



Advertisments