Searching \ for '[PIC] C Strings in Watch Window?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/languages.htm?key=c
Search entire site for: 'C Strings in Watch Window?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] C Strings in Watch Window?'
2009\07\24@115507 by Harold Hallikainen

face
flavicon
face
I have an array of strings (string[NumStrings][StringSize] that I want to
look at in the watch window. I only see each element of the string instead
instead of being able to see string[n] in the value field. Is there a way
to tell the watch window to show me the ASCII string? It'd make it easier
to see what's going on.


Harold


--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2009\07\24@135709 by Carl Denk

flavicon
face
Assuming this is MPLAB

In the watch window,
right click on the variable, and should see a menu select properties and
then ASCII.
click on the "+" at the left of the variable to expand the array
(standard windows explorer type action)

Harold Hallikainen wrote:
{Quote hidden}

2009\07\24@145835 by Harold Hallikainen

face
flavicon
face

> Assuming this is MPLAB
>
> In the watch window,
> right click on the variable, and should see a menu select properties and
> then ASCII.
> click on the "+" at the left of the variable to expand the array
> (standard windows explorer type action)
>

Thanks! That does show the string on a character by character basis. I'm
looking to see the whole string in the "value" field. Strings seem to show
up ok there if they are not in an array of strings, but otherwise I have
to read the string vertically, which is more difficult. It'd be great if
one of the properties was "ASCII String" and another was "ASCII
Character".

Harold

--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2009\07\27@112017 by Rikard Bosnjakovic

picon face
On Fri, Jul 24, 2009 at 21:10, Harold Hallikainen<spam_OUTharoldTakeThisOuTspamhallikainen.org> wrote:

> Thanks! That does show the string on a character by character basis. I'm
> looking to see the whole string in the "value" field. Strings seem to show
> up ok there if they are not in an array of strings, but otherwise I have
> to read the string vertically, which is more difficult. It'd be great if
> one of the properties was "ASCII String" and another was "ASCII
> Character".

How do you define your array?

Since MPLAB behaves correct for an array of chars (which is a string)
then perhaps it wants some perculiar variable type for it to show
"correctly" (i.e. horizontal) in the watch window.


--
- Rikard - http://bos.hack.org/cv/

2009\07\27@113329 by Harold Hallikainen

face
flavicon
face

> On Fri, Jul 24, 2009 at 21:10, Harold Hallikainen<.....haroldKILLspamspam@spam@hallikainen.org>
> wrote:
>
>> Thanks! That does show the string on a character by character basis. I'm
>> looking to see the whole string in the "value" field. Strings seem to
>> show
>> up ok there if they are not in an array of strings, but otherwise I have
>> to read the string vertically, which is more difficult. It'd be great if
>> one of the properties was "ASCII String" and another was "ASCII
>> Character".
>
> How do you define your array?
>
> Since MPLAB behaves correct for an array of chars (which is a string)
> then perhaps it wants some perculiar variable type for it to show
> "correctly" (i.e. horizontal) in the watch window.
>

I'm defining the array like this:

int8_t LogData[10][40]

I've previously defined int8_t as char. I'd like to see the 40 character
lines in the watch window. Instead, I see the individual characters listed
one per index.

Thanks!

Harold

--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2009\07\29@225603 by Gerhard Fiedler

picon face
Harold Hallikainen wrote:

{Quote hidden}

You can try to define the strings, then an array of strings... doesn't
make a difference for C, but maybe for MPLAB.

 typedef int8_t LogString[40];
 LogString LogData[10];

Also, maybe you can watch LogData[0] etc... does this make a difference?
Or try to use char instead of int8_t. Even though it's typedef'ed, you
never know what MPLAB does with this...

Gerhard

2009\07\30@142202 by Harold Hallikainen

face
flavicon
face

{Quote hidden}

THANKS! Putting LogData[0] in the watch window worked!

Harold

--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...