Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: asd34 on January 02, 2013, 07:51:03 am

Title: Visualization of Arrays content in the watch list
Post by: asd34 on January 02, 2013, 07:51:03 am
Dear All,

I have difficulties when I have to visualize the content of arrays during the program execution, especially when I'm doing it step by step. Generally, if you hoover the mouse over the specific array or any variable you should see the content of at the time of execution. But when I'm using it doesn't show anything at all, though I remember that for old releases of CB I was be able to see the content of the variable or array etc.. I believe that I've switched something on and off. Does any body can help be to remedy the situation?


CB vesion : 12.11
MinGW     : 4.4.0
OS Win7 x64


Best Regards,
Title: Re: Visualization of Arrays content in the watch list
Post by: oBFusCATed on January 02, 2013, 08:16:01 am
Steps:
1. Select expression
2. Right click -> Add watch
3. Right click on the watch -> Properties
4. Enable 'is array' and set the count
5. Click ok
Title: Re: Visualization of Arrays content in the watch list
Post by: asd34 on January 02, 2013, 08:39:41 am
Thanks,

BTW I have the dynamic arrays. What should I do if it says "A syntax error in expression, near `[1]@10'." ?

I wonder, how it handles the 1,2 or multidimensional arrays, is that Start and Count accounts for all dimensions in the array, isn't there a more automatic way, like editor detects itself the size of the array.

Regards,
Title: Re: Visualization of Arrays content in the watch list
Post by: oBFusCATed on January 02, 2013, 08:48:03 am
BTW I have the dynamic arrays. What should I do if it says "A syntax error in expression, near `[1]@10'." ?
What is the code and the expression you are using. Probably you have to wrap in brackets.

I wonder, how it handles the 1,2 or multidimensional arrays, is that Start and Count accounts for all dimensions in the array, isn't there a more automatic way, like editor detects itself the size of the array.
I doubt it is possible to detect the sizes, unfortunately.
Start and count are for single dimension only.
Title: Re: Visualization of Arrays content in the watch list
Post by: asd34 on January 02, 2013, 09:00:02 am
Quote
BTW I have the dynamic arrays. What should I do if it says "A syntax error in expression, near `[1]@10'." ?
What is the code and the expression you are using. Probably you have to wrap in brackets.

Sorry I forgot to mention that I use GFortran in MinGW suite. Here is the definiton for the array and memory allocation.

Code
real, allocatable :: Kmm(:,:)
Allocate ( Kmm(rigid_floor_num*3,rigid_floor_num*3) )

Here is the sample assignment,
Kmm(:,:) = Rd_assem(1:test_num-1,1:test_num-1)
Title: Re: Visualization of Arrays content in the watch list
Post by: asd34 on January 03, 2013, 08:42:46 am
Your guidance will be appreciated.
Title: Re: Visualization of Arrays content in the watch list
Post by: oBFusCATed on January 03, 2013, 09:38:10 am
Unfortunately I know nothing about fortran...
Title: Re: Visualization of Arrays content in the watch list
Post by: asd34 on January 03, 2013, 09:44:10 am

IMHO it shouldn't have anything to do with fortran compiler, other than simply fetching the data from it. But it's a CB issue as far as I got ?

Am I wrong?

Regards,
Title: Re: Visualization of Arrays content in the watch list
Post by: oBFusCATed on January 03, 2013, 09:59:36 am
IMHO it shouldn't have anything to do with fortran compiler, other than simply fetching the data from it. But it's a CB issue as far as I got ?
If you prove that it works in command line gdb, the it will be a cb's issue.