I have a problem with a C predicate I've written. I have a list of list in input ([[1,2,3],[4,5,6]]). And I would like to put that in a short **. I don't know how I can do that. I have these lines in my fonction : /*************************************************************************/ i=0; for(ecword_list = ecword_liste_trou ; ecword_list.is_list(car,cdr) == EC_succeed; ecword_list = cdr)//walk through the main list {//construction of the list but I'm not sure, I think the problem is here list_tmp = list(car,cdr); nb = liste_taille_domaine[i]; //get the length of the list if(nb>0) { liste_trou[i] = (short *)malloc(nb*sizeof(short)); // allocation of memory j=0; for(ecword_list2 = list_tmp ; ecword_list2.is_list(car2,cdr2) == EC_succeed; ecword_list2 = cdr2)//walk through the little list { res = car2.is_long(&x);//recuperation of the element if (res != EC_succeed) return res; liste_trou[i][j]=x;//I put element in my short ** j++; } } i++; } /*************************************************************************/ The problem is when I would like to build the list which in the other list.Received on Tue Jun 21 09:23:05 2005
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:37 PM GMT GMT