Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > retrun type

Reply
Thread Tools

retrun type

 
 
yaseenzaidi@NETZERO.com
Guest
Posts: n/a
 
      12-10-2004
I like to know the subtle differences in the qualified expression
stg_logic_vector'(...) and type conversion function
to_std_logic_vector(...) both returning the same type.

 
Reply With Quote
 
 
 
 
Paul Uiterlinden
Guest
Posts: n/a
 
      12-10-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I like to know the subtle differences in the qualified expression
> stg_logic_vector'(...) and type conversion function
> to_std_logic_vector(...) both returning the same type.


Qualifying is used to resolve abiguities (so no conversion takes place),
whereas type conversion really converts from one type to another.

In my experience qualifying is needed most frequently with overloaded
procedures. Example: write(l, string'("hello"));. Without the
qualifying, the type of the second argument of write is ambiguous
(string, std_logic_vector, bit_vector), because write is overloaded for
these types.

Paul.
 
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
type(d) != type(d.copy()) when type(d).issubclass(dict) kj Python 5 12-26-2010 06:48 PM
#define ALLOCIT(Type) ((Type*) malloc (sizeof (Type))) Yevgen Muntyan C Programming 10 02-13-2007 02:52 AM
STL lists as retrun value Christian Christmann C++ 4 02-04-2006 03:34 PM
Re: Type casting- a larger type to a smaller type pete C Programming 4 04-02-2004 05:19 PM
Re: Type casting- a larger type to a smaller type heyo C Programming 3 04-01-2004 06:35 PM



Advertisments