EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Enumerated string comparisons
From: "Dudley, David" <[email protected]>
To: "[email protected] core-talk" <[email protected]>
Date: Thu, 10 Oct 2013 15:07:49 +0000
Guys,

Sorry for butting in on this, and I'm probably not qualified to inject into this, but has anyone ever considered something like a 'lint' syntax checker program to verify that the DB is basically right?

Don't get me wrong, i *hate* 'lint', but something simplified might catch some of these errors.


I mean, I agree that things should be 'exact match' matching, but it'd be nice to have some kind of filter program to tell you that you misspelled something, or got the wrong case, or got an incorrect option, or the whole thing is just so wrong it can't figure out what to do with it (like trying to load a file you edited in Wordpad, and forgot to save in text format or something - not admitting I've done that…).

Waiting till you load the db into the IOC just seems like an 'all-or-nothing' approach that can lead to these kind of errors.

Later-

David Dudley


On Oct 9, 2013, at 9:01 PM, "Johnson, Andrew N." <[email protected]> wrote:

> It would be easy to use case insensitive matching instead of the strcmp() that we use at present, but I think we should check the string against all possibilities using a case sensitive comparison before using the more fuzzy matching, and doing that would make the code a little longer. The underline/space thing would make the comparison a bit more fuzzy than I'm really comfortable with myself. I will see what I can do to improve the error message, but IIRC the message is a bit removed from where the error is detected.
> 
> Thanks for all your comments,
> 
> - Andrew
> 
> -- 
> Sent from my iPad
> 
> On Oct 9, 2013, at 4:09 PM, "Eric Norum" <[email protected]> wrote:
> 
>> On Oct 9, 2013, at 3:58 PM, Benjamin Franksen <[email protected]> wrote:
>> 
>>> 
>>> 
>>> Therefore I see a case for some very limited sort of dwimming, namely:
>>> 
>>> (1) Case-insensitive matching.
>>> 
>>> (2) Identifying underline '_' and space ' '.
>> I'm more in favour of completely strict matching as is now the case (but with really descriptive diagnostic messages on failure).   My opinion is that 'dwimming' results in making things less understandable because it gets too hard to remember the rules and thus databases and such get harder to comprehend.
>> 
>> -- 
>> Eric Norum
>> [email protected]
>> 
>> 
>> 
>> 
>> 
> 



Replies:
Re: Enumerated string comparisons Benjamin Franksen
References:
Re: Enumerated string comparisons Benjamin Franksen
Re: Enumerated string comparisons Michael Davidsaver
Re: Enumerated string comparisons Benjamin Franksen
Re: Enumerated string comparisons Eric Norum
Re: Enumerated string comparisons Johnson, Andrew N.

Navigate by Date:
Prev: Re: Enumerated string comparisons Johnson, Andrew N.
Next: Re: Enumerated string comparisons Benjamin Franksen
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Enumerated string comparisons Johnson, Andrew N.
Next: Re: Enumerated string comparisons Benjamin Franksen
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·