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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | long strings |
From: | Michael Davidsaver <[email protected]> |
To: | Andrew Johnson <[email protected]> |
Cc: | [email protected] |
Date: | Tue, 18 Oct 2011 11:46:42 -0400 |
On 10/18/2011 11:30 AM, Andrew Johnson wrote:
Hi Michael, On 2011-10-18 Michael Davidsaver wrote: ... The number of elements of a long string (char array) must always include the terminating nil character, thus an empty string must have an element count of one, not zero. If you don't include the terminator in your element count your string might get old garbage appended to it.
Ah, protocol... So I must initialize NORD to 1 as well?
record(waveform, "$(P)AmpExpr-SP") { field(FTVL, "CHAR") field(NELM, "100") field(PINI, "YES") field(NORD, "1") } record(aSub, "$(P)AmpExpr-Calc_") { field(FTA , "CHAR") field(NOA , "100") ... }