Skip to main content
MFran.4
Senior
February 17, 2022
Solved

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

  • February 17, 2022
  • 4 replies
  • 2605 views

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!

This topic has been closed for replies.
Best answer by TDK

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.

4 replies

TDK
TDKBest answer
February 17, 2022

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""."
MFran.4
MFran.4Author
Senior
February 18, 2022

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.

TDK
February 18, 2022
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""."