EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: in 3.15.2 the file aSubRecord.h is not properly generated by dbdToRecordtypeH.pl
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Wed, 3 Jun 2015 08:52:59 -0500
Hi Yves,

On 06/03/2015 08:36 AM, Yves Lussignol wrote:
> I found the following problem when compiling the gensub record module
> with EPICS base 3.15.2, but it also exists for the aSub record: the
> record field "NOT" is generated as "epicsUInt32 NOT" instead of
> "epicsUInt32 not".
> 
> typedef struct aSubRecord {
>     ...
>     epicsUInt32         nos;        /* Max. elements in S */
>     epicsUInt32         NOT;        /* Max. elements in T */
>     epicsUInt32         nou;        /* Max. elements in U */
>     ...
> } aSubRecord;

This is actually deliberate behaviour, because in C++ the lower-case
word "not" is a keyword which cannot be used as an identifier name. The
Perl scripts that convert record.dbd files into a record.h file have a
list of C and C++ keywords and other names which they do not allow to be
used as field names. If we didn't do that, EPICS users would not be able
to write aSub and genSub record subroutines in C++.

The simplest way to avoid using such a keyword is to leave the name in
upper case, hence the structure definition you quoted above.

- Andrew

-- 
Light thinks it travels faster than anything but it is wrong.
No matter how fast light travels, it finds the darkness has
always got there first, and is waiting for it.
    -- Terry Pratchett, Reaper Man

References:
in 3.15.2 the file aSubRecord.h is not properly generated by dbdToRecordtypeH.pl Yves Lussignol

Navigate by Date:
Prev: in 3.15.2 aSubRecord.h is not properly generated by dbdToRecordtypeH.pl Lussignol Yves
Next: RE: asynPortDriver deadlock when using asynOctet Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: in 3.15.2 the file aSubRecord.h is not properly generated by dbdToRecordtypeH.pl Yves Lussignol
Next: in 3.15.2 aSubRecord.h is not properly generated by dbdToRecordtypeH.pl Lussignol Yves
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·