| delorie.com/archives/browse.cgi | search |
| Message-Id: | <m0zsots-000S5wC@inti.gov.ar> |
| Comments: | Authenticated sender is <alex AT natacha DOT inti DOT gov DOT ar> |
| From: | "Alex Lozano" <alex AT inti DOT gov DOT ar> |
| Organization: | INTI - CITEI |
| To: | "Bonifati" <abonifati AT telsa DOT it>, djgpp AT delorie DOT com |
| Date: | Wed, 23 Dec 1998 11:16:36 +3 |
| MIME-Version: | 1.0 |
| Subject: | Re: question about Rhide |
| X-Confirm-Reading-To: | "Alex Lozano" <alex AT inti DOT gov DOT ar> |
| X-pmrqc: | 1 |
| In-reply-to: | <75on7n$q7o$1@fe2.cs.interbusiness.it> |
| X-mailer: | Pegasus Mail for Windows (v2.54) |
| X-MIME-Autoconverted: | from Quoted-printable to 8bit by delorie.com id JAA01384 |
| Reply-To: | djgpp AT delorie DOT com |
> I'm an italian student. I have a question about RHIDE. Please answer.
> Thank you !
>
> How can I watch arrays? I now a pointer is equivalent to an array in C,
> but if I want to see an array represented by a pointer variable, let's
> say int *a; of 5 elements, I'm obliged to write (in the "Add to watch
> list" box):
>
> a[0]
> a[1]
> a[2]
> a[3]
> a[4]
>
> Is there a shorter way? (When I define a static array, for example
> int a[5], it is enough writing "a" in the Add to watch list box to watch
> the array)
>
> Antonio Bonifati - Italy
> abonifati AT telsa DOT it << my e-mail!
>
With the following example:
int main(void)
{
int a[10];
int *p;
for (int i=0;i<10 ;i++)
a[i]=i;
p=a;
return 0;
}
Try this in the watch window:
/d p AT 11 decimal format
or /x p AT 11 hex format
Note: you have to compile without compiler optimization to be able to
watch p pointer.
=====================================================================
Alex Lozano - (Electronic Engineer) E-mail: alex AT inti DOT gov DOT ar
INTI - CITEI http://www.inti.gov.ar/citei alex DOT lozano AT usa DOT net
CC 157 - (1650) - San Martín
Buenos Aires - ARGENTINA
Home Page: http://welcome.to/AlexHome
http://welcome.to/wice51
=====================================================================
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |