Experimental Physics and Industrial Control System
On Tuesday 04 April 2006 17:43, J. Lewis Muir wrote:
> A feature I would like is for snc to not generate warning messages
> for variables that are defined in other included source files. For
> example:
>
> Warning: variable "asynSuccess" is used but not declared.
>
> I get this message at compile time if I'm using the asyn module and
> want to check the return status of an asyn function call from the SNL
> program. asynSuccess is defined as an asynStatus enum value in
> asynDriver.h which I have included in my SNL program.
>
> These warnings are common when defines or enums or whatever are
> defined in other files and one wants to reference them from the SNL
> program.
This is probably going to be difficult. It would mean snc must parse all
the header files that are included. However, snc does not contain a
full-flegded C parser: it recognizes only a small subset of C.
Particularly, it cannot (IIRC) parse any C declarations.
> Similarly, I'd like to be able to use defines for declaring SNL char
> arrays. For example, it would be great if I could have a file color.h
> that has
>
> #define MAX_COLOR_NAME_SIZE 21
>
> and then in the SNL program be able to do
>
> char colorName[MAX_COLOR_NAME_SIZE];
>
> This allows me to have the SNL program and other C code make use of
> this MAX_COLOR_NAME_SIZE define so that it can be defined in just one
> place.
Provided your header file does only contain SNL constructs and cpp
instructions (#define, #include, etc.), this should be possible right
now, by preprocessing the source (with cpp) before compiling with snc.
Ben
- Replies:
- Re: snc/seq enhancements ... local-variable access Eric Norum
- References:
- snc/seq enhancements ... local-variable access Laznovsky, Michael
- Re: snc/seq enhancements ... local-variable access J. Lewis Muir
- Navigate by Date:
- Prev:
Re: snc/seq enhancements ... local-variable access J. Lewis Muir
- Next:
ld error: Module contains undefined symbol(s) and may be unusable. Porter, Rodney R.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: snc/seq enhancements ... local-variable access J. Lewis Muir
- Next:
Re: snc/seq enhancements ... local-variable access Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024