cancel
Showing results for 
Search instead for 
Did you mean: 

How to see only a part of an array in expression view?

MFran.4
Senior

Hello!

My case is:

I have an array of 100 items, but now I know only the first 10 are used so I'd like to watch only the first ten variables.

I know I can list the individual array items one after another (e.g, arr[0], arr[1] and so on to arr[9]), but I was wondering if there's a better way to do it.

I imagined something like

arr[0-10]

arr[:10]

arr[0], 10

arr, 10

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Right click the array in the "Variable" tab -> Display as array -> choose new bounds.

If you wanted to show items 90-100, you could dereference the 90th item to get a pointer and do the same thing.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
TDK
Guru

Right click the array in the "Variable" tab -> Display as array -> choose new bounds.

If you wanted to show items 90-100, you could dereference the 90th item to get a pointer and do the same thing.

If you feel a post has answered your question, please click "Accept as Solution".

Thank you so much! Exactly what I hoped.

Do you know if this is possible also in the "Live Expressions" view as it is in expressions and variables? From what I see, it can't be done.

Try it. If it works, it works. If it doesn't, it doesn't.
If you feel a post has answered your question, please click "Accept as Solution".

Excellent piece of advice.

Thanks again!