Re: [vhdl-200x-ft] Some consistency proposals

From: Ries, John <johnr@model.com>
Date: Fri Aug 20 2004 - 11:24:29 PDT

I have mixed feelings added quote to the standard.std package.
Because standard.std is always visible QUOTE now becomes like a reserved word.
You can't define it in any other package and get it visible.
Also you can just do "to_integer ( " & '"' & to_string (svar) & '"' & ") overflow"

Regards,
   John

Bailey, Stephen wrote:
> """ works but people have difficulty remembering how to get a single quote
> character. I see nothing wrong with the quote constant for those who
> either
> like to type more ;-) or those who have difficulty remembering """ to get a
> single quote.
>
> -Steve Bailey
>
> > -----Original Message-----
> > From: owner-vhdl-200x-ft@eda.org
> > [mailto:owner-vhdl-200x-ft@eda.org] On Behalf Of Peter Ashenden
> > Sent: Thursday, August 19, 2004 5:03 PM
> > To: 'David Bishop'; vhdl-200x-ft@eda.org
> > Subject: RE: [vhdl-200x-ft] Some consistency proposals
> >
> > David,
> >
> > > 1) A constant called "quote" in standard.std. This can be
> > used like
> > > the NL constant, so that you can include a quote character in an
> > > assert. Example:
> > > assert (false)
> > > report "to_integer (" & quote & to_string (svar) & quote &
> > > ") overflow"
> > > severity error.
> >
> > What's wrong with
> >
> > report "to_integer (""" & to_string (svar) & """) overflow"
> > severity error.
> >
> > Cheers,
> >
> > PA
> >
> > --
> > Dr. Peter J. Ashenden peter@ashenden.com.au
> > Ashenden Designs Pty. Ltd. www.ashenden.com.au
> > PO Box 640 Ph: +61 8 8339 7532
> > Stirling, SA 5152 Fax: +61 8 8339 2616
> > Australia Mobile: +61 414 70 9106
> >
> >
> > > -----Original Message-----
> > > From: owner-vhdl-200x-ft@eda.org
> > > [mailto:owner-vhdl-200x-ft@eda.org] On Behalf Of David Bishop
> > > Sent: Thursday, 19 August 2004 23:58
> > > To: vhdl-200x-ft@eda.org
> > > Subject: [vhdl-200x-ft] Some consistency proposals
> > >
> > >
> > > In the midst of writing the code for the new packages,
> > there are a few
> > > things I would like to add. Yes, I know, we are in the middle of
> > > things here, but for consistency's sake, I would like to put these
> > > before the group.
> > >
> > > 1) A constant called "quote" in standard.std. This can be
> > used like
> > > the NL constant, so that you can include a quote character in an
> > > assert. Example:
> > > assert (false)
> > > report "to_integer (" & quote & to_string (svar) & quote &
> > > ") overflow"
> > > severity error.
> > >
> > > 2) In numeric_std, my FAQ is "how do I convert an UNSIGNED number
> > > into a SIGNED number"? Why don't we create two functions,
> > "to_signed"
> > > which takes an unsigned number, adds a sign bit to it, and returns,
> > > and "to_unsigned" which does an "abs" is the number is
> > negative, and
> > > drops the sign bit.
> > >
> >
> >
>

-- 
-- mailto: johnr@model.com     phone: (503)685-0864
--   http://www.model.com        fax: (503)685-0921
--
Received on Fri Aug 20 11:24:35 2004

This archive was generated by hypermail 2.1.8 : Fri Aug 20 2004 - 11:24:39 PDT