[pdp-discuss] 'Operation: delete not defined for type: (void)' error
Richard Jones
dickjr at gmail.com
Tue Oct 24 07:24:34 MDT 2006
I've written one of those handy ctrl scripts that is used so much in
the book examples. It's giving me some odd problems. The entire
.css file is shown below. When I try to autorun it, the program
crashes with the following error:
bp++> Operation: delete not defined for type: (void)
./Tester_Ctrl.css
>0
PDP++ saving recover file(s) and exiting from signal:
segmentation violation
Segmentation fault
If I load the same file at the css prompt, however:
bp++>load "/Tester_Ctrl.css"
and then do:
bp++>EditObj(tester_ctrl)
it works fine. No 'delete not defined' error, no core dump.
Interestingly, if I've comment out the next-to-last line in the css
file that instantiates the tester_ctrl instance, do the load at the
prompt, and then do:
bp++>Tester_Ctrl tester_ctrl;
I get the dump and error. What is the error telling me and what
should I do about it?
Many thanks.
--
Richard Jones
dickjr at gmail.com
<----- Tester_Ctrl.css ---->
class TesterCtrl {
// #NO_OK #NO_CANCEL Unit Resetter
public:
void ResetUnits(); // #BUTTON zero out unit acts, nets, slopes, etc.
TesterCtrl();
};
void TesterCtrl::ResetUnits() {
int i;
for(i=0; i<.layers[1].units.size; i++) {
// printf("i=",i);
.layers[1].units[i].act=0;
.layers[1].units[i].cur_act_slope=0;
.layers[1].units[i].prv_act=0;
.layers[1].units[i].net=0;
}
}
TesterCtrl tester_ctrl;
EditObj(tester_ctrl);
More information about the PDP-Discuss
mailing list