Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Electronic Equipment > VHDL > can I have unco...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 6110 of 6257
Post > Topic >>

can I have unconstrained String as record element?

by Tricky <Trickyhead@[EMAIL PROTECTED] > Jun 24, 2008 at 08:48 AM

Can I do what I asked, I suspect not, so Im thinking along the lines:

type my_record_type is
  record
    name    : string(1 to 20);
    ....
  end record my_record;

Basically, I want to be able to give the record name a constant string
when it is delcared like:

CONSTANT my_record : my_record_type := ( name => "Betty Swollocks",
--length only 15, complains unless I pad to 20 chars.
                                                                     
.......)

Or am I just going to have to pad the name with whitespace to make it
up to name'length?
 




 5 Posts in Topic:
can I have unconstrained String as record element?
Tricky <Trickyhead@[EM  2008-06-24 08:48:06 
Re: can I have unconstrained String as record element?
KJ <kkjennings@[EMAIL   2008-06-24 09:02:24 
Re: can I have unconstrained String as record element?
Andrew <sharpa17@[EMAI  2008-06-24 13:27:07 
Re: can I have unconstrained String as record element?
Reuven <rpaley000@[EMA  2008-06-24 16:07:39 
Re: can I have unconstrained String as record element?
Andrew <sharpa17@[EMAI  2008-06-25 04:50:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Aug 30 8:06:51 CDT 2008.