Author Topic: need some help with this code  (Read 5327 times)

0 Members and 1 Guest are viewing this topic.

andrew_nao

  • Guest
Re: need some help with this code
« Reply #15 on: August 22, 2014, 09:10:58 AM »

Are you certain that (length rel_lst) = (length descrepancy) ?
Perhaps using (while (and rel_lst descrepancy) ... ) would be safer.

rel_lst and descrepancy are 2 different lists

Exactly - the test expression for your while loop is only testing whether one of these lists is non-nil, yet both are reduced within the while loop, meaning one list could be nil before the other unless (length rel_lst) = (length descrepancy) as noted.

i didnt think of that, youre absolutely right that might be the case, i will look into that.