Re: Defined string with 4 characters is sizeof 4 in watch and 5 in compiled code.

"Peter Lissenburg [email protected] [msp430]" <[email protected]> Tue, 15 Jul 2014 10:34:58 +1000
Newsgroups gmane.comp.hardware.texas-instruments.msp430.discuss
Message-ID <[email protected]>
Possibly 4 chars and a terminating null, '\0' ?
PL

On 15/07/2014 9:38 AM, [email protected] [msp430] wrote:
> So, just out of curiosity, how can
>
>
> sizeof(LOGGER_SERIAL_DEFAULT)
>
>
> be both 4 (in the QuckWatch) and 5 in the compiled code (red line in
> disassembly) ?
>
> It's defined as:
>
>
> #define LOGGER_SERIAL_DEFAULT "----"
>
>
> So in my mind it should be 4 (if the compiler wanted to count the quotes
> it would be 6) but NEVER 5.
>
>
> http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/166/0552.delme.png
>
> 	
> image
> <http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/166/0552.delme.png>
>
> 	
> 	
> http://e2e.ti.com/cfs-file.ashx/__key/communityserv...
> <http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/166/0552.delme.png>
>
> 	
> View on e2e.ti.com
> <http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/166/0552.delme.png>
>
> 	
> Preview by Yahoo
>
> 

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



------------------------------------
Posted by: Peter Lissenburg <[email protected]>
------------------------------------

To unsubscribe from the msp430 group, send an email to:
[email protected]