Message-Id: Comments: Authenticated sender is From: "Alex Lozano" Organization: INTI - CITEI To: "Bonifati" , djgpp AT delorie DOT com Date: Wed, 23 Dec 1998 11:16:36 +3 MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Subject: Re: question about Rhide X-Confirm-Reading-To: "Alex Lozano" X-pmrqc: 1 In-reply-to: <75on7n$q7o$1@fe2.cs.interbusiness.it> X-mailer: Pegasus Mail for Windows (v2.54) Content-Transfer-Encoding: 8bit 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 =====================================================================