home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sgi / 18158 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.2 KB

  1. Path: sparky!uunet!dtix!relay!relay2!afterlife!adm!news
  2. From: karron@karron.med.nyu.edu (Dan Karron (karron@nyu.edu))
  3. Newsgroups: comp.sys.sgi
  4. Subject: assigning pointer values in dbx/edge...
  5. Message-ID: <34739@adm.brl.mil>
  6. Date: 17 Dec 92 18:53:40 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 47
  9.  
  10.  
  11. I have a bad pointer in an array. 
  12.  
  13. I would like to zero out that value so that the software
  14. skips over it.
  15.  
  16. int *p,**pp,***ppp;
  17.  
  18. ppp=Some3darray;
  19.  
  20. if(!ppp)
  21.     return; /* don't even start */
  22.  
  23. for(i=0;i<N;i++)
  24.     {
  25.     pp=ppp[i]; 
  26.  
  27.     if(!pp)
  28.         continue; /* skip empty parts */
  29.  
  30.     for(j=0;j<N;j++)
  31.         {
  32.         p=pp[j];
  33.         
  34.         if(!p)
  35.             continue;
  36.         DoItNow(p);
  37.         }
  38.     }
  39.  
  40.  
  41. Now there is a bad address at pp[j], and I just
  42. want to zero it out and continue through the array.
  43.  
  44. Dbx won't let me do
  45.  
  46. assign pp[j]=0x00000000, or something like that.
  47.  
  48. How can I stuff a value in the pointer array ?
  49.  
  50. Dan.
  51.         
  52. | karron@nyu.edu (e-mail alias )         Dan Karron, Research Associate      |
  53. | Phone: 212 263 5210 Fax: 212 263 7190  New York University Medical Center  |
  54. | 560 First Avenue                       Digital Pager  <1>  212 397 9330    |
  55. | New York, New York 10016               <2> 10896   <3> <your-number-here>  |
  56. ``Too busy doing to write about it, too busy writing to do anything about it.''
  57.