EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: strings
From: "Jeff Hill" <[email protected]>
To: "'Kay-Uwe Kasemir'" <[email protected]>, <[email protected]>
Date: Thu, 29 Sep 2005 09:57:46 -0600
> I assume you must still account for the unlikely possibility
> that it's signed, so you always check
>      if (xx < 0  ||  xx >= length)

Considering how discussions went at Big Ed's I probably shouldn't mention
this, but The ANSI C standard defines size_t to be the unsigned integral
type that is the result of the sizeof() operator.

> Well, it's only 11:00 and now I get this urge for oil dripping
> pepperoni pizza.

I don't think that an accessor class exists - therefore my waist line will
publicly inherit from the pepperoni pizza base class. Nevertheless, the
dinner class doesn't taste good if it doesn't multiply derive from pizza and
IPA... 

Jeff

> -----Original Message-----
> From: Kay-Uwe Kasemir [mailto:[email protected]]
> Sent: Thursday, September 29, 2005 9:07 AM
> To: [email protected]
> Subject: Re: strings
> 
> 
> On Sep 29, 2005, at 10:13 , Andrew Johnson wrote:
> > I am not providing cast operators, and to some extent I agree about
> > the difficulty reading code that uses them.  However the assignment
> > operator= is an integral part of C++ that the compiler will create
> > for you (usually wrongly) if you don't explicitly tell it not to.
> .. right, which makes it more of a C--
> 
> > class StringReader {
> > ...
> >     // Individual byte access
> >     virtual char at(size_t pos) const = 0;
> Yes, that looks good to me.
> 
> At one point in time, actually the Oak Ridge EPICS meeting,
> we were gathered at Big Ed's Pizza, a place that I have not
> visited ever since, but not because of any bad feelings,
> there simply never was an opportunity for it.
> Anyway, we discussed some EPICS 'OSI' ideas. One issue
> was signed vs. unsigned for index variables and sizes.
> I was asked what I used at the time in the archiver code,
> and mentioned size_t, and the result was grave concern
> because who knows how big size_t is, if it's signed or not, ...
> So is it now OK to use size_t?
> I assume you must still account for the unlikely possibility
> that it's signed, so you always check
>      if (xx < 0  ||  xx >= length)
> and then you get the warning about x always being positive
> on most compilers?
> Well, it's only 11:00 and now I get this urge for oil dripping
> pepperoni pizza.
> 
> -Kay



Replies:
Re: strings Kay-Uwe Kasemir
References:
Re: strings Kay-Uwe Kasemir

Navigate by Date:
Prev: Re: ICALEPCS 2005: EPICS workshop: EPICS V4 Runtime Database Kay-Uwe Kasemir
Next: Re: [Fwd: Re: ICALEPCS 2005: EPICS workshop: EPICS V4 Runtime Database] Kay-Uwe Kasemir
Index: 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: strings Kay-Uwe Kasemir
Next: Re: strings Kay-Uwe Kasemir
Index: 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·