Re: Re: Defined string with 4 characters is sizeof 4 in watch and 5 in compiled code.
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.discuss |
|---|---|
| Message-ID | <CAHA=FJhvGqLe7Yc2FCnVdyU9F3ndPJzaAoF2A+D-BdwRsh3W7g@mail.gmail.com> |
Thinking back years: The compiler inserts the null when it recognizes the quotation marks are used. The preprocessor is running before that step has completed. -Max Murphy On Tue, Jul 15, 2014 at 1:36 AM, 'Steve Mayfield' [email protected] [msp430] <[email protected]> wrote: > > > Maybe the quick watch uses strlen() which would return 4. > > *From:* mailto:[email protected] <[email protected]> > *Sent:* Monday, July 14, 2014 5:39 PM > *To:* [email protected] > *Subject:* [msp430] Re: Defined string with 4 characters is sizeof 4 in > watch and 5 in compiled code. > > > > Ok, so 4 chars and a null, but then why does the debugger in the quick > watch window, report that it is 4? > > >